~/talk

Adaptive query optimization in PostgreSQL

Talkat PGConf.dev 2024 · 2024-05-28..05-31· [databases, machine-learning]
links:none on file
slides:none on file

An extension for PostgreSQL that stores actual cardinalities from executions and uses a K-nearest-neighbors model to predict node cardinalities, sharing those with the planner via hooks. Tested on JoinBench and IMDb-like schemas with learning (parallelism off for learning), cardinality error falls toward zero; about 10 queries speed up ~4×, ~11 double, and two slow down. It skips unreliable partial nodes and temporary-table nodes, exposes per-query stats for autotuning, and reduces misplans caused by correlated or nonuniform data.

AI-written summary · about

  1. 0:00Introduction to AQO
  2. 1:54Optimizer problems with cardinality
  3. 4:43Model description of AQO
  4. 8:25Learning workflow in AQO
  5. 15:01Problems and features in AQO
  6. 18:24Example database and terminology
  7. 26:23Testing results and benchmarks
  8. 29:17Conclusion and future improvements
  9. 30:23Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.