Top 5 PostgreSQL Query Tuning Tips
summary
Five concrete steps: monitor wait time at the statement level to spot IO or locking hotspots; run EXPLAIN ANALYZE and read actual rows/loops to find expensive steps (hash joins, sorts, full scans); inspect table sizes, stats and indexes; find the driving table by comparing filter selectivity and add left‑leading or composite indexes; use covering indexes and proper constraints. Case studies show a join query dropping from ~45 ms to 0.5 ms and a star‑schema report from ~2 s to 1.8 ms after these changes.
AI-written summary · about
chapters (7)
- 0:00PostgreSQL query tuning intro
- 1:04Monitor wait time
- 3:49Explain plans with execution data
- 10:30Analyze execution plan objects
- 12:40Find driving table
- 20:12Billing query optimization case
- 23:45Final tips & Q&A
related talks
23mBest Practices for Tuning Slow Postgres Queries
51mPostgreSQL: Practical Examples of SQL Query Optimization
47mIdentifying Slow Queries and Fixing Them!
50mImproving Postgres' Efficiency
41mOptimizing your app by understanding your PostgreSQL database
26mPostgreSQL performance tips you have never seen before V2.0
43mPostgres Performance: From Slow to Pro
18mPostgreSQL: Tuning parameters or Tuning Queries? with Henrietta Dombrovskaya
