
Designing a Cost Model 87
Assuming that the optimizer returns the access path requests associated
with each index-based subtree in the query execution plan, we can transform
the relevant subplans by simply reimplementing each request based on the set
of available indexes. Consider a physical request ρ =N×(T, E, R, P, O, A) (see
Section 4.1.3), and suppose that we want to calculate the cost of an alternative
subplan that uses index I = T(c
1
,... ,c
n
) to implement ρ. In order to do so,
we can conceptually simulate the implementation rules in the optimizer that
produced ρ in the first place and can approximate what the optimizer would
have obtained under ...