Under what conditions might such an index be used?
We discussed the choice of indexes to optimize the execution of the nested query (12.1) and pointed out that a clustered index on Teaching with search key CrsCode would not be considered. It might, however, be used in optimizing the execution of the equivalent, non-nested query
```
SELECT C.CrsName, P.Name
FROM Professor P, Teaching T, Course C
WHERE T.Semester=’S2003’ AND P.Department=’CS’
AND C.DeptId = ’MAT’
AND P.Id = T.ProfId AND T.CrsCode=C.CrsCode
```
If, in addition, there was a clustered index on Course with search key DeptId the computation of the second join in (12.2) could be done very quickly. If the join resulted in a small number of rows, the remaining computation could also be done quickly.
You might also like to view...
What type alarm occurs if the sensor post cover in vertical taut-wire sensor (VTWS) is removed?
a. None. b. Tamper. c. Intruder. d. Equipment fault.
Which of the following statements is false?
a. The command window in Windows is called a Command Prompt. b. The command window in OS X is called a Terminal. c. The command window in Linux is called the shell. d. All of the above are true.