Postgres in Production Special Series: How to Query pg_stat_statements to Find Slow and Expensive Postgres Queries (Part 7)
In the final, seventh part of the "Postgres in Production" series, Ryan Booz shows how to query pg_stat_statements to find slow and expensive Postgres queries. He recommends checking pg_stat_activity first during incidents, and describes two ways to get a usable time window from cumulative metrics: diffing snapshots or resetting and re-querying. The episode also covers which columns to order by, why the slowest query is not always the problem, and what to look for in a monitoring tool.
AI-written summary, checked against the cited sources. How summaries work