Database Reference
In-Depth Information
Again, the Orders table contains indexes on both the OrderDate and the
ShippedDate columns. In this instance, the optimizer will join two indexes using
a merge join to return the appropriate result set. By joining the two indexes,
SQL Server created the same effect as having one covering index on the table.
By collecting more than just the pointers from the index slices, this imple-
mentation avoids the third pitfall of multiple index access, unnecessary table
touches . However, the first one, thick index slices , and possibly also the second
one, unnecessary sorting of the result rows , remain. To avoid them altogether, a
real fat index (covering index) is needed; for this query it would be (OrderDate,
ShippedDate).
EXERCISES
10.1. Assume the CIA table described in the section Multiple Index Access with
Bitmap Indexes has 200,000,000 rows. Estimate the disk space required for (a)
bitmap indexes and (b) a semifat B-tree index.
Assume 8 bits per byte. Convert the difference in disk space into dollars per month.
Search WWH ::




Custom Search