Cost Estimation
For each plan considered, must estimate cost:
- Must estimate cost of each operation in plan tree.
- Depends on input cardinalities.
- We’ve already discussed how to estimate the cost of operations (sequential scan, index scan, joins, etc.)
- Must estimate size of result for each operation in tree!
- Use information about the input relations.
- For selections and joins, assume independence of predicates.
We’ll discuss the System R cost estimation approach.
- Very inexact, but works ok in practice.
- More sophisticated techniques known now.