~/talk

How to choose the right index

Talkat HighLoad++ 2012 · 2012-10-22..10-23· [databases]
links:none on file
slides:none on file

Practical rules for indexes: use EXPLAIN and slow query logs to find the hot queries, then pick indexes that cut scanned rows — a billion-row scan that returns ~1,000 rows becomes feasible with a composite index and can drop to ~100 rows with a covering index. Favor composite + covering indexes where equality columns come first, avoid many low-value indexes, and prevent random I/O by designing for sequential scans. Examples reference MySQL optimizer behavior (5.5/5.6), index-merge limits, and Fractal-tree/TokuDB storage to reduce I/O.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 1:32Why indexes matter for performance
  3. 2:35Basic definitions of tables and indexes
  4. 8:29Selecting important queries to index
  5. 10:56Three simple rules for good indexes
  6. 13:32Rule one: Get fewer data rows
  7. 25:04Rule two: Avoid point queries
  8. 32:53Rule three: Avoid sorting overhead
  9. 37:20Fractal tree indexes explained
  10. 42:04Q&A and final remarks
~/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.