Databases Reference
In-Depth Information
How it works...
When we query the table using the first fields of a multi-column index, the optimizer can
choose to use an Index Range Scan operation. This is what happens in step 5, as shown
in the following screenshot:
When running an Index Range Scan operation, the database finds the first block of the
index containing values that satisfy the predicate (in our example CUST_GENDER = "M"
and CUST_YEAR_OF_BIRTH = 1945 ) and scans the index data block to find all the entries
that satisfy the conditions—examining the leaf blocks of the index using the link between
the leaves. This operation is very fast.
In step 6 we use the first and the third field of the index in our predicate in this case the
execution plan will change as shown in the following screenshot:
 
Search WWH ::




Custom Search