query planner

The part of the database that turns a SQL query into a plan, choosing among indexes, scans and join orders.

In more detail

Because SQL says what you want, not how to get it, the planner decides, using statistics about the data to estimate costs. It may still prefer a scan when an index would not help, and a bad row estimate can lead it to a bad join.

Related terms

Taught in

References