1: | Would the use of a unique index on a small table be of any benefit? |
A1: | The index may not be of any use for performance issues; but, the unique index would keep referential integrity intact. Referential integrity is discussed in Hour 3, "Managing Database Objects." |
2: | What happens when the optimizer chooses not to use an index on a table when a query has been executed? |
A2: | A full table scan occurs. |
3: | Should the most restrictive clause(s) be placed before the join condition(s) or after the join conditions in the WHERE clause? |
A3: | The most restrictive clause(s) should be evaluated before the join condition(s) because join conditions normally return a large number of rows. |
1: | Rewrite the following SQL statements to improve their performance. Use the EMPLOYEE_TBL and the EMPLOYEE_PAY_TBL as described here:
CONSTRAINT EMP_PK PRIMARY KEY (EMP_ID)
CONSTRAINT EMP_FK FOREIGN KEY (EMP_ID) REFERENCES EMPLOYEE_TBL (EMP_ID)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A1: |
|