The Database Shows Its Work: Reading a Query Plan
EXPLAIN prints the plan the database will run — a tree of scans, joins, and sorts read from the bottom up, each node tagged with an estimated cost. What the numbers mean, and why a full-table scan is sometimes the right answer. Run against PostgreSQL 18.