10.5 Consider the query tree shown in FIGURE 10.8. Using the heuristics given in Section 10.2.3, write two different optimized query trees for this expression.
Information for Exercises 10.6 through 10.12.
Assume we have the following information about the University database:
All tables are stored in packed form in blocks of length 4096 bytes.
Student has 10,000 tuples, each 200 bytes long. It is hashed on stuId, the primary key, and has a secondary nonclustered index on lastName, with three levels. There are 8,000 values for lastName, 2,000 values for firstName, 25 values for major, and 150 values for credits.
Faculty has 800 tuples of length 100 bytes. It has an index on facId, the primary key, with two levels. There is a secondary nonclustered index on department, with one level. facName has 650 values, department has 25 values, and rank has 4 values.
Class has 2,500 tuples with length of 100 bytes. It is hashed on classNumber, the primary key, and has no secondary indexes. facId has 700 values here, schedule has 35 values, and room has 350 values.
Enroll has 50,000 tuples with length of 100 bytes. It has a composite index on the primary key, {classNumber, stuId}, with four levels, and it has no other index. The attribute grade has 10 values.