Find slow queries in PostgreSQL
Use log_min_duration_statement and pg_stat_statements to find slow PostgreSQL queries, with exact settings, units and what needs a restart.
Blog / Category
Guides specific to PostgreSQL: logging and statistics, configuration parameters, running several versions, and what the server can tell you about the queries it runs. Each claim is checked against the documentation for the version named in the post.
Use log_min_duration_statement and pg_stat_statements to find slow PostgreSQL queries, with exact settings, units and what needs a restart.