PostgreSQL

Slow PostgreSQL queries with high execution time or IO consumption

warning
performanceUpdated Mar 24, 2026
How to detect:

Queries with high execution time, slow IO, or frequent invocation degrade application performance and can be identified through Heroku Data diagnostics or query plan analysis

Recommended action:

Identify slow queries using Heroku Data's Diagnose tab (break down by slowest I/O, execution time, most frequently invoked, most time consuming). Re-run with EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) prefix. Analyze query plan with pev2 tool at explain.dalibo.com. Optimize based on plan showing costliest nodes or bad estimates.