EXPLAIN ANALYZE Discipline

Read query plans.

Overview

EXPLAIN ANALYZE discipline reads query plans before optimising. The plan tells you what the database is actually doing; tuning without reading the plan is guess-and-check that wastes engineer time.

The approach

Three habits separate evidence-based optimisation from guess-and-check: read the plan first, run ANALYZE for real numbers, visualise when the plan gets complex.

Why this compounds

Each plan read teaches the team a little more about the optimiser. Compounded across hundreds of queries, the team develops an actual model of how the database executes work.