Skip to content
Preptima
mediumConceptScenarioMidSeniorStaff

Walk me through how you read a PostgreSQL execution plan.

5 min readUpdated 2026-08-15

Answer

Short answer

Read the plan tree innermost-node-first, remember that EXPLAIN only estimates while EXPLAIN ANALYZE executes, multiply each node's actual rows by its loops, and treat a large gap between estimated and actual rows as the primary finding.

Was this answer helpful?

Likely follow-ups

  • What does a Bitmap Heap Scan give you that a plain Index Scan does not?
  • You see "Sort Method: external merge Disk: 84MB" in the plan. What do you change?
  • How would you get a plan for a query that only misbehaves for one particular parameter value?
  • What does an Index Only Scan need in order to stay index-only, and why does it sometimes stop?

Related questions

Further reading