Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Execute the following two SQLs. Which one is faster than the other to produce the output? Explain why one is faster than the other?

1. Execute the following two SQLs. Which one is faster than the other to produce the output? Explain why one is faster than the other? (you may have to zoom in. Sorry)

image text in transcribed

1. 2. LSELECT cols.table nae FROH all canstraints cans, all cons calunns cols MCRE con.comstraint type c.constraint nc.constraint nane SELECT table nanc fron all tables here awner 'KSYANG' I cols.coltun nae I ORDER BY cols.table nae, C2 3 5 ols position; DEPARIPENT DEPENDENT DEPT LOCATTONS COLS.TAOLE NAHEII IOOLS.COLUNN NAEII11O0NS.oWNER DEFENDENT, DE DEPT LOCATIONS. DNO. KS.AG DEPT LOCATIONS, DLOCATION, KSYANS 6 raus selecte FENDENT NAF NORKS ??. ESSN. KSYANG 3. leaf blocks 11 blevel I1 1 avg data blocks per_key Il I clustering factor II index_type SLSELECT indcx nanc avy leaf blacks per key I FROH all_ indexcs distinct kays FROM all ind colinns MERE table 3 KSYNG NHERE table onner 'KSYANG ORDER BY index_nana, calunn positian; 234 TABLE NAEIl1INDEXNAHEI 111COLUN NAMEII11COLUMN POSITION SYs CE8G NOFHAL, . 1. WOFKS_CN. 1. 1, 1, 48 DEPENDENT. SYS CO059559. DEPENDENT NAHE. DEPT LOEATIONS, SYS CEGGE, D, 1 SYS CBEG?39 NORMAL, e, 1, DEPENDENT, 1, 1, 1, 11 NORKS ON. SYS C0069553. ESSN. 1 NORKS CN, SYs CBB, PND. 2 Query Evaluation Use Spool command to log the output of SQL (e.g., SPOOL filename and SPOOL OFF) Use AUTOTRACE command to see Execution Plans for SQL statements(i.e, set autotrace traceonly explain) . . " There are two files you should submit: 1) explanation for query execution plans and 2) recorded spool file. 1. Execute the following two SQLs. Which one is faster than the other to produce the output? Explain why one is faster than the ather? (5 points). SELEC FROM fnamc, E.Iname, P.pname E., works on W 2 SELECT E.fname, E.lname, P.pname FROM employee E, works_on W, project P WHERE E.essn=w.essn AND W.pr -P 1. 2. LSELECT cols.table nae FROH all canstraints cans, all cons calunns cols MCRE con.comstraint type c.constraint nc.constraint nane SELECT table nanc fron all tables here awner 'KSYANG' I cols.coltun nae I ORDER BY cols.table nae, C2 3 5 ols position; DEPARIPENT DEPENDENT DEPT LOCATTONS COLS.TAOLE NAHEII IOOLS.COLUNN NAEII11O0NS.oWNER DEFENDENT, DE DEPT LOCATIONS. DNO. KS.AG DEPT LOCATIONS, DLOCATION, KSYANS 6 raus selecte FENDENT NAF NORKS ??. ESSN. KSYANG 3. leaf blocks 11 blevel I1 1 avg data blocks per_key Il I clustering factor II index_type SLSELECT indcx nanc avy leaf blacks per key I FROH all_ indexcs distinct kays FROM all ind colinns MERE table 3 KSYNG NHERE table onner 'KSYANG ORDER BY index_nana, calunn positian; 234 TABLE NAEIl1INDEXNAHEI 111COLUN NAMEII11COLUMN POSITION SYs CE8G NOFHAL, . 1. WOFKS_CN. 1. 1, 1, 48 DEPENDENT. SYS CO059559. DEPENDENT NAHE. DEPT LOEATIONS, SYS CEGGE, D, 1 SYS CBEG?39 NORMAL, e, 1, DEPENDENT, 1, 1, 1, 11 NORKS ON. SYS C0069553. ESSN. 1 NORKS CN, SYs CBB, PND. 2 Query Evaluation Use Spool command to log the output of SQL (e.g., SPOOL filename and SPOOL OFF) Use AUTOTRACE command to see Execution Plans for SQL statements(i.e, set autotrace traceonly explain) . . " There are two files you should submit: 1) explanation for query execution plans and 2) recorded spool file. 1. Execute the following two SQLs. Which one is faster than the other to produce the output? Explain why one is faster than the ather? (5 points). SELEC FROM fnamc, E.Iname, P.pname E., works on W 2 SELECT E.fname, E.lname, P.pname FROM employee E, works_on W, project P WHERE E.essn=w.essn AND W.pr -P

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions