~/talk

The Secret Life of SQL: How to Optimize Database Performance

Talkat RailsConf 2017 · 2017-04-25..04-27· [databases]
slides:none on file

Explains concrete rules and fixes: how indexes work left-to-right, when to use index prefixes for long varbinary paths, why OR prevents index use in MySQL and how rewriting with UNION cuts a minute-long query to ~11 ms, when to FORCE or USE an index (FORCE INDEX drops a 40s sort to ~1 ms), and when denormalizing user flags and using ChatOps commands like .mysql dead-indexes and in-Slack EXPLAINs measurably improves API response rates.

AI-written summary · about

  1. 0:00Introduction
  2. 0:37Overview
  3. 6:11Indexing
  4. 8:28Index Prefixes
  5. 12:07Use an OR
  6. 18:37Avoid redundant data across tables
~/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.