Database Reference
In-Depth Information
Page
103
4
1
101
3
103
109
5
6
109
101
2
Index
Table
Figure 3.1 Traditional index scan.
is embodied in the access path . For the example we used in Chapter 2 and shown
again in Figure 3.1, the access path would define a sequential scan of a portion
of the index together with a synchronous read for each table page required.
Index Slices and Matching Columns
Thus a thin slice of the index, depicted in Figure 3.1, will be sequentially scanned,
and for each index row having a value between 100 and 110, the corresponding
row will be accessed from the table using a synchronous read unless the page
is already in the buffer pool. The cost of the access path is clearly going to
depend on the thickness of the slice, which in turn will depend on the range
predicate; a thicker slice will, of course, require more index pages to be read
sequentially and more index rows will have to be processed. The real increase
in cost though is going to come from an increase in the number of synchronous
reads to the table at a cost of perhaps 10 ms per page. Similarly, a thinner slice
will certainly reduce the index costs, but again the major saving will be due to
fewer synchronous reads to the table. The size of the index slice may be very
important for this reason.
The term index slice is not one that is used by any of the relational database
systems; these all use their own terminology, but we feel that an index slice
is a much more descriptive term and one that we can use regardless of DBMS.
Another way that is often used to describe an index slice is to define the number of
matching columns used in the processing of the index. In our example ( having
a value between 100 and 110 ), we have only a single matching column. This
Search WWH ::




Custom Search