Reading Postgres EXPLAIN without crying
EXPLAIN ANALYZE is the difference between guessing and knowing. Read it
bottom-up and inside-out: the deepest, most-indented node runs first, and its
estimated vs actual rows tell you where the planner's mental model broke.
A Seq Scan on a big table during a hot query is usually a missing index. A
wildly wrong row estimate is usually stale statistics — run ANALYZE.