Why Your PostgreSQL Query Is Slow: EXPLAIN ANALYZE for Developers
EXPLAIN ANALYZE is not only a DBA tool. For backend engineers, it is a practical way to understand why a PostgreSQL query is slow, whether the problem is a sequential scan, a nested loop, a sort, or simply reading too many buffers.