Query Processing So Far
Steps in processing an SQL statement
- parse, map to relation algebra (RA) expression
- transform to more efficient RA expression
- instantiate RA operators to DBMS operations
- execute DBMS operations (aka query plan)
Cost-based optimisation:
- generate possible query plans (via heuristics)
- estimate cost of each plan (sum costs of operations)
- choose the lowest-cost plan (... and choose quickly)
|