Automating Index Selection Using Constraint Programming
summary
An open source constraint programming model converts PG stat statements workloads into per-table scans, uses hypoPG to get hypothetical planner costs and estimates an index write overhead metric, then lexically optimizes two goals (minimize cost, then overhead). The demo Rust CLI picks 1–3 indexes on demand, shows cost shifting from ~6000 to ~6400 while reducing overhead from 0.31 to 0.20, accepts a strictness 0.9 tradeoff, handles multi-column index permutations but notes GIN costing and partitioning as open problems.
AI-written summary · about
chapters (6)
- 0:00Introduction to the problem
- 1:41Defining index selection
- 9:37Constraint programming model
- 27:26Practical implementation demo
- 38:17PostgreSQL integration tips
- 42:40Q&A and closing remarks








