~/talk

Reading the Tea Leaves: Query Optimization with Postgres and AI

Talkat Data Con LA 2026 · on Saturday, 2026-08-22· [databases, ai-assisted-development]
name:Mike Mull
github:mikemull
slides:none on file

Explains how Postgres uses cost estimates from PG stats to pick bitmap heap scans, index scans or sequential scans, and how EXPLAIN/ANALYZE/BUFFERS shows real vs estimated costs (example: 2.5M rows, 36k pages, optimizer estimating 22k matches for value 1990). Describes hypo_pg hypothetical indexes for safe experimentation and shows LLMs (Gemini/Claude) plus cloud code skills and agents that parse plans, propose indexes, emit create/rollback SQL, and run log-driven tuning while warning about overfitting and long concurrent index builds.

AI-written summary · about

  1. 0:00Why query optimizers matter
  2. 2:58Brief history of optimizers
  3. 5:24Postgres query pipeline
  4. 7:16Single table access paths
  5. 8:22Understanding EXPLAIN
  6. 11:32Cost calculation in Postgres
  7. 14:03Postgres catalog and stats
  8. 16:50Row estimates and selectivity
  9. 19:16Join ordering fundamentals
  10. 21:03Postgres join methods
  11. 23:58Genetic query optimizer
  12. 25:22AI parsing query plans
  13. 26:45Introducing skills for AI
  14. 27:49HypoPG for hypothetical indexes
  15. 29:14Moving to AI agents
  16. 31:20Types of AI database agents
  17. 33:49Live query tuning demo
  18. 36:00Challenges with agents
  19. 36:43Building agent teams
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.