Building automatic adviser & performance tuning tools
summary
pg_qualstats collects per-predicate selectivity, index usage and estimation-error counters and produces a global minimal-index suggestion list (stable at v2.0.2 in production). pg_plan_advsr records plan history and uses execution feedback to correct row-estimates, search alternative join orders and join methods, then emits optimizer hints to reproduce the chosen plan. Demo on Join Order Benchmark query 31c (10 joins, 10 GB) shortens runtime about eightfold, showing the tools are built and effective on complex joins.
AI-written summary · about
chapters (10)
- 0:00Introduction of speakers
- 0:50Talk agenda overview
- 1:11What is a query plan
- 3:58Causes of inefficient plans
- 10:37Demo of advisor tools
- 14:50Global index suggestion with pg qualstat
- 16:59How pg plan advisor works
- 19:12Demo of pg plan advisor tuning
- 22:25Summary of tools and benefits
- 23:51Conclusion and Q&A
