How do you investigate a slow PostgreSQL query?
Reveal the answer and explore the explanation.
15MediumHigh priorityHow do you investigate a slow PostgreSQL query?
Answer
MediumHigh priority
How do you investigate a slow PostgreSQL query?
Answer
Displays a database query plan; EXPLAIN ANALYZE executes the statement and reports observed execution statistics.
Practical example
Investigate whether a query uses an index or scans the whole table.
Reference: Further reading ↗