Characterizing the Search Space 69
associated with equality predicates, scanning such index still satisfies the
order in O). The included columns in this case are obtained as in the
previous scenarios. We finally compare the cost of the two alternatives
(i.e., the one derived from scenario 3 with an additional sort operator
and the one that natively returns tuples in the right order) and return
the one with the minimal expected cost.
Consider an index request over table T with E ={(a, 100)}, R ={(b, 10)},
P =∅, O ={c}, and A ={d}. The best index ignoring the sort column is
I
1
= T(a, b|c, d). This index does not return tuples in the right order, so the
resulting plan would have a sort operator on top. The alternative index that
returns tuples in the righ ...