Concept Flow - pg_stat_statements for slow queries
Enable pg_stat_statements extension
Collect query execution stats
Query pg_stat_statements view
Filter queries by high total_time or mean_time
Identify slow queries for optimization
This flow shows how PostgreSQL collects query stats with pg_stat_statements and how to find slow queries by querying its view.