Paper · Query Processing

Access Path Selection in a Relational Database Management System

P. G. Selinger et al. · SIGMOD · 1979

The birth of cost-based query optimisation, from System R.

Summary

A declarative query can be executed in many ways: different indexes, join orders and join methods, with costs that differ by orders of magnitude. System R needed a way to choose a good plan automatically. Without one, the relational promise of data independence would be impractical.

The paper introduces cost-based optimisation. It estimates plan cost from I/O and CPU using catalog statistics and selectivity estimates for predicates. It then uses dynamic programming to search join orders, restricted to left-deep trees, and keeps plans that produce useful sort orders, which it calls interesting orders.

Most relational optimisers still follow this blueprint. Cardinality estimation, cost models and join enumeration remain active research areas, and all of them trace back to this paper.

Key ideas

  • Cost-based plan selection using statistics from the system catalog.
  • Selectivity estimates for predicates to predict intermediate result sizes.
  • Dynamic programming over join orders, restricted to left-deep plans.
  • Interesting orders: keep plans whose sort order helps later operators.

More Query Processing papers