Best Practices for Tuning Slow Postgres Queries
summary
Practical walkthrough of diagnosing slow Postgres queries using real outputs and concrete fixes: how to benchmark with EXPLAIN (ANALYZE, BUFFERS), how misestimated row counts and conditional dependencies break planner costing, when to raise the statistics_target or use CREATE STATISTICS, why parameterized index scans change performance with join order, and when to force plans with pg_hint_plan or SET flags to isolate a misestimate. Watch if you want hands‑on tactics and commands to reproduce and fix slow plans.
AI-written summary · about
chapters (8)
- 0:00Start
- 0:10Introduction - Best Practices for Tuning Slow Postgres Queries
- 0:52Debugging why a Query is Slow
- 2:37Benchmarking with EXPLAIN(ANALYZE, BUFFERS)
- 5:41Planner Costing & Why it Can Never be Perfect
- 11:32Join Order & Parameterized Index Scans
- 19:30Guiding the Planner to the Right Plan
- 22:27Conclusion
related talks
47mIdentifying Slow Queries and Fixing Them!
41mOptimizing your app by understanding your PostgreSQL database
52mUnderstanding PostgreSQL Query Plans (aka EXPLAIN)
26mBe Good Friends with Query Planner
24mTop 5 PostgreSQL Query Tuning Tips
50mImproving Postgres' Efficiency
51mPostgreSQL: Practical Examples of SQL Query Optimization
43mPostgres Performance: From Slow to Pro
