Evidence Before Changes
We captured slow query logs during real peaks using pg_stat_statements rather than guessing, and ranked queries by total time consumed — the product of how slow each one is and how often it runs. That ranking showed that a handful of queries were responsible for most of the load.
For each, we read the execution plan with EXPLAIN ANALYZE to see what PostgreSQL was actually doing, which turned vague complaints about slowness into specific, fixable problems.
- Peak-time evidence from pg_stat_statements
- Queries ranked by total time, not just slowest
- Execution plans read for every top offender




















