pg_stat_statements
pg_stat_statements tracks normalized query text with call count, total time, rows, and I/O. It answers which queries consume the most database time, not which single run was slowest. Enable on every production PostgreSQL 18.4 cluster and reset stats after major releases for clean baselines.