~/talk

How Postgres could index itself

Talkat PostgresOpen Silicon Valley 2017 · 2017-09-06..09-08· [databases]
links:none on file
slides:none on file

Claim: Postgres can automatically recommend and create real indexes by combining query collection, planner simulation and hypothetical indexes. Implementation 1 uses PG stat statements + pg_query to extract table/column candidates; implementation 2 streams slow logs into Dexter, creates ephemeral indexes via hypoPG, runs EXPLAIN to measure final cost and picks the best index. Dexter can process days of logs in minutes, creates indexes concurrently, and has surfaced 20+ indexes used in production; current limits: btree only, no partial/expression removal logic, and hosted providers may not support hypoPG.

AI-written summary · about

  1. 0:00Start
  2. 2:39adding indexes to a database
  3. 3:15calculate the average time that a query is running
  4. 8:39traverse an index on multiple columns
  5. 9:32adding an index
  6. 10:02add a multi column index
  7. 11:44stores the most common values for every column
  8. 14:44log all the slow queries in your database
  9. 17:23explain on the query
  10. 17:47add hypothetical indexes
  11. 18:52adding a single column index
  12. 20:49running some one-off queries on your database
  13. 24:19remove any unused indexes postgres
  14. 24:38aggregate the stats across all databases in your cluster
  15. 33:45replace the log parser
~/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.