Cookbook recipe

Reading EXPLAIN (ANALYZE, BUFFERS) like a pro

Applies to PostgreSQL 13–17 Last reviewed May 2026 Grounded in source
Estimated investigation4 min

Scenario

EXPLAIN output looks like a wall of text. Learn to read it top-down for time, rows, and I/O so you can find the one node that is costing you. Diagnose it Always use ANALYZE and BUFFERS…

Investigation Path

EXPLAIN output looks like a wall of text. Learn to read it top-down for time, rows, and I/O so you can find the one node that is costing you.

Diagnose it

Always use ANALYZE and BUFFERS together:

EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)
SELECT ...;

Read inner-to-outer. For each node compare estimated vs actual rows, look at actual time, and check Buffers: shared read (disk) vs shared hit (cache).

This is a Pro lesson

Get every Learning Pathway and cookbook recipe — grounded in PostgreSQL source code, with diagnostics, fixes, and prevention for each topic.

Continue this lesson to learn:

  • Why it happens
  • How to fix it
  • Prevent it next time
  • Related & next steps
  • All 36 Learning Pathway lessons
  • 170+ cookbook recipes
  • Source-grounded diagnostics & fixes

Secure checkout Cancel anytime Source-grounded

Career Impact

This scenario builds production judgment and operational confidence under pressure.

Open Career Dashboard →

Keep going

Related & next steps

Was this helpful?

← All cookbook recipes