What the brief asked
Find the key papers, group them into families, explain how each extends the last, compare their strengths and limits, and reflect on the process. At least two papers had to be from 2021 or later.
COMP90050 · Group 40 · 2023 Winter term
In 2023 our group surveyed self-driving databases — systems that forecast their own workload and choose their own indexes. This lab rebuilds the survey as something you can run: five index advisors from 1985 to 2023 compete on a live SQLite database inside your browser.
sqlite> EXPLAIN QUERY PLAN
...> SELECT COUNT(*), SUM(l_quantity)
...> FROM lineitem WHERE l_partkey = 742;
`--SCAN lineitem 1.62 ms
-- MAB · C²UCB picks arm lineitem(l_partkey, l_quantity)
-- θᵀx = 4.81 + α√(xᵀV⁻¹x) = 0.37
sqlite> CREATE INDEX ix_lineitem__l_partkey__l_quantity
...> ON lineitem (l_partkey, l_quantity); 18.4 ms
`--SEARCH lineitem USING COVERING INDEX
ix_lineitem__l_partkey__l_quantity (l_partkey=?) 0.03 msThe coursework
COMP90050 asked groups of four to survey a hot topic in databases — not an annotated bibliography, but a categorisation and critique of the main approaches — in a 10–16 page report and a 25-minute talk. Group 40 chose self-driving databases and split the work in two: index selection, and workload-driven optimisation.
Find the key papers, group them into families, explain how each extends the last, compare their strengths and limits, and reflect on the process. At least two papers had to be from 2021 or later.
Index selection moved from heuristics to constraint programming to machine learning; learned tuners recommend far faster than commercial tools, but results are hard to compare because every paper benchmarks differently.
The algorithms the survey described, implemented and racing on one engine with one stopwatch — so the comparison we said was missing can finally be run, by anyone, in a browser tab.
Explainer
Scroll through the survey's argument. The diagram follows along.
Level 0
Every index, memory setting and partition is chosen by a database administrator, usually after something has already gone slow. Pavlo et al. call this level 0: manual. Most production systems in 2023 still lived here for physical design.
Levels 1–2
Tools such as AutoAdmin (1997) and DB2 Advisor (2000) ask the optimiser what if an index existed, then recommend a set. A DBA still picks the workload to tune for and when to apply the change — levels 1 and 2 on the autonomy ladder.
Levels 3–5
A self-driving DBMS removes the human from the loop: it anticipates the workload, chooses actions, applies them at the right moment and learns from what happened. Level 5 is fully autonomous; our survey asked how far index selection and workload-driven optimisation had got.
Predictor
Kossmann and Schlosser split a self-driving system into a predictor, tuners and an organiser. The predictor forecasts the workload: QueryBot 5000 turns queries into templates, clusters templates that rise and fall together, and forecasts each cluster. You can run that pipeline on the forecasting page.
Tuners
Tuners turn the forecast into candidate actions — build this index, resize that buffer — and behaviour models such as ModelBot2 estimate what each action would cost and save. Index advisors are tuners; so are knob tuners such as OtterTune.
Organiser
Building an index takes time and storage, so the organiser schedules actions ahead of demand. PilotBot0 plans over a receding horizon with Monte Carlo tree search. Online tuners close the loop the other way: the multi-armed bandit learns only from runtimes it actually observed.
Index selection
Whatever the era, index advisors follow the same three steps: enumerate candidate indexes from the workload, prune them to the promising ones, then explore configurations under a storage budget. The numbers on the right are AutoAdmin running on this lab's own twelve-query workload.
syntactically relevant indexes from the workload's predicates
candidates that win for at least one query on their own
indexes kept by Greedy(2, k) under the budget, after 2,778 what-if calls
01 / 07
Forty years of index selection
Our report followed Kossmann et al.'s timeline: greedy heuristics first, then integer programming, then machine learning. Five of them run in the arena; the About page lists where each port departs from its paper.
DROP
Starts from all single-column indexes and repeatedly drops the one whose removal hurts least. Presented in 1985, published in 1987.
Whang · Foundations of Data Organization
AutoAdmin
Introduced the what-if optimiser call: per-query candidate selection, Greedy(m, k) enumeration, and multi-column indexes built up one column at a time.
Chaudhuri & Narasayya · VLDB
DB2 Advisor
Lets the optimiser plan each query with virtual indexes, credits the gain to the indexes used, solves a knapsack by benefit per byte, then tries random swaps.
Valentin et al. · ICDE
CoPhy
Formulates index selection as a binary integer program over cached plan costs and hands it to a solver; quality depends on how far the solver gets.
Dash, Polyzotis & Ailamaki · PVLDB
Dexter
Groups queries by template, creates hypothetical indexes with HypoPG and keeps those the planner says reduce cost.
Andrew Kane · Open source
QueryBot 5000
Templatises queries, clusters templates by arrival-rate history, and forecasts each cluster with linear regression, an LSTM and kernel regression (the HYBRID model catches rare spikes).
Ma et al. · SIGMOD
DBA bandits
The conference version of the MAB tuner: C²UCB over workload-generated index arms, learning from observed runtimes.
Perera et al. · ICDE
Budget-aware MCTS
When what-if calls are rationed, spends them with Monte Carlo tree search over configurations instead of greedy enumeration.
Wu et al. · SIGMOD
Key result we reported
The report's Table 2 reproduced Perera et al.'s comparison of a multi-armed bandit (MAB) with a commercial physical design tool (PDTool) on TPC-H and TPC-DS. The bandit never spent more than 1.7 minutes recommending (the tool needed up to 310) and finished 5 of 6 workloads sooner, taking up to 61% less time on TPC-DS random. The commercial tool still won static TPC-H, the setting offline tools are designed for.
TPC-H
StaticMAB +24%
| Row | Query execution | Index creation | Recommendation | Total |
|---|---|---|---|---|
| PDTool | 46.4 min | 2.5 min | 0.6 min | 49.4 min |
| MAB | 55.6 min | 5.7 min | 0.1 min | 61.4 min |
DynamicMAB -6%
| Row | Query execution | Index creation | Recommendation | Total |
|---|---|---|---|---|
| PDTool | 26.4 min | 9.4 min | 1.6 min | 37.3 min |
| MAB | 25.1 min | 9.7 min | 0.1 min | 35.0 min |
RandomMAB -18%
| Row | Query execution | Index creation | Recommendation | Total |
|---|---|---|---|---|
| PDTool | 84.1 min | 14.7 min | 7.5 min | 106 min |
| MAB | 80.4 min | 7.1 min | 0.1 min | 87.6 min |
TPC-DS
StaticMAB -28%
| Row | Query execution | Index creation | Recommendation | Total |
|---|---|---|---|---|
| PDTool | 303 min | 1.4 min | 44.9 min | 349 min |
| MAB | 242 min | 5.9 min | 1.5 min | 250 min |
DynamicMAB -15%
| Row | Query execution | Index creation | Recommendation | Total |
|---|---|---|---|---|
| PDTool | 187 min | 6.1 min | 11.1 min | 204 min |
| MAB | 156 min | 16.5 min | 1.7 min | 174 min |
RandomMAB -61%
| Row | Query execution | Index creation | Recommendation | Total |
|---|---|---|---|---|
| PDTool | 324 min | 8.2 min | 310 min | 642 min |
| MAB | 227 min | 19.8 min | 1.4 min | 248 min |
Minutes, from Perera et al., IEEE TKDE 2023, as tabulated in our report. The report attributed this paper to Kraska et al.; the survey map lists the correction.
Explore
Database journey
In 2020 Sunchuangyu (Rin) Huang designed this database for an individual INFO20003 assignment. In 2023, COMP90050 taught what a database does with a design once it runs. The arena now loads the INFO20003 file byte for byte and lets the survey's index advisors, and your own LLM if you bring a key, tune it.
2020Semester 1
INFO20003 Database Systems
Design the database
A ticketing and visitor database for the Louvre, designed from a written brief: who buys what, which entrance and wing a ticket passes, audio guides, timed exhibition slots.
2023Winter term
COMP90050 Advanced Database Systems
Make it run well, on its own
What happens after design: how rows are stored, how indexes and the optimiser decide a query's cost, and how a self-driving database chooses its own indexes.
Shared file: louvre.db · 19 tables · about 66,000 synthetic rows · SHA-256 b762146e2601… · why the arena drops its indexes (DR-004)
About this project
The University of Melbourne · 2023 Winter term · Group 40
Team, stack and academic-integrity noteSunchuangyu (Rin) Huang
Index selection
Runqiu Fei
Index selection
Xiaoyi Liu
Workload-driven optimisation
Qingxuan Yang
Workload-driven optimisation