Glossary — in plain language

Query planner

Also called: Optimizer, planner


In plain English

The query planner is the part of PostgreSQL that decides HOW to run your SQL — which indexes to use, which join method, what order — by estimating the cost of each option and picking the cheapest. You write WHAT you want; the planner decides HOW.

Why it matters

When a query is slow, you read its plan with EXPLAIN (ANALYZE). Bad plans usually come from stale statistics (run ANALYZE), wrong cost settings, or missing indexes.

Was this helpful?

← Browse the full glossary