Appendix G – Physical Database Design and Data Structures for Database Processing
Page G-21
A clustered index is one in which the order of the table’s rows in secondary memory is based on
G.33. What kind of index can be most helpful in processing an ORDER BY query?
A clustered index is most helpful, as the data are already sorted in the appropriate way. As
G.34. Give an example of an index and a query, other than those presented in this appendix,
that would enable the query to be answered by examining only the index, not the actual
data.
If there is a multicolumn index on (CUSTOMER.AreaCode, CUSTOMER.PhoneNumber), then
G.35. What is the difference between an index on columns (LastName, ZIPCode) and an index
on columns (ZIPCode, LastName)? Give an example of a query that could benefit from
either index. Give an example of a query that could benefit from one index but not the
other.
The index on (LastName, ZIPCode) will have the search keys ordered first by LastName, then
G.36. In a table with two columns, how many different indexes can be created?
G.37. Why is it undesirable to create an index to speed up every possible query?
Not every possible query is equally likely, so many of these indexes will be a waste of time to