PostgreSQL Query Performance Insights
summary
Explains how to use pg_stat_activity, pg_stat_statements, auto_explain, pgBadger, and pg_stat_monitor to get real signals: pg_stat_statements adds 3–4% overhead and defaults to 5000 queries retained; auto_explain forces plans into logs; pgBadger parses huge logs (author created a 4GB log in 15 minutes at ~5000 TPS); pg_stat_activity is ephemeral; pg_stat_monitor implements per-minute buckets and stores actual parameter values plus histograms and is moving from RC to GA.
AI-written summary · about
chapters (9)
- 0:00Start
- 1:39Presentation Outline
- 5:34Components of Query Processing
- 9:03EXPLAIN - Basics: Costs
- 16:23EXPLAIN ANALYZE - Basics
- 31:15pg_stat_statements - Challenges
- 36:03auto_explain Extension
- 42:00pgbadger Challenges
- 47:33Tools for the Use Case
related talks
51mPostgreSQL Query Performance Insights
57mQuery Logging and Workload Analysis
25mPoint-in-time query tuning and observability with pg_stat_statements
39mDeep dive into PostgreSQL internal statistics
31mpg_stat_advisor: Optimizing PostgreSQL Planner with Insights
27mPostgres Performance in 15 Minutes
49mLeveraging pgBadger for Effective PostgreSQL Troubleshooting
26mBe Good Friends with Query Planner
