
168
7.1
Basic Query Tuning
Figure 7.8 shows the same query as in Figures 7.6 and 7.7, but with the
first two prefix columns for the index. The index is used even though the
third column is omitted from the WHERE clause. The optimizer considers
using the index the best option, because much fewer rows are read than for
the query in Figure 7.7, where only a single column of the index was used.
An index skip scan is used in Figure 7.9, where prefix index columns can
be skipped. An index skip scan is a special type of index read that can utilize
subset columns of composite indexes, where perhaps the first column in a
multiple column composite index is not required ...