~/talk

MySQL Indexes and Histograms to Speed Up Your Queries

Talkat CakeFest 2022 · 2022-09-29..09-30· [databases]
slides:none on file

Explains how MySQL uses clustered primary keys and secondary indexes, shows a demo where an index cuts optimizer cost from 10.25 to 0 and reads one row instead of a table scan, and shows a city/district example where adding an index drops cost from 442 to 9 and rows read to 26. Covers functional indexes, multi-value JSON indexes, hash joins for equality joins, invisible indexes and why histograms help only for low‑churn data.

AI-written summary · about

  1. 0:00Introduction
  2. 0:25Daves background
  3. 1:12What is an index
  4. 2:16What is a NoSQL index
  5. 3:05MySQL clustered index
  6. 3:51MySQL primary key
  7. 4:31MySQL secondary keys
  8. 6:05MySQL indexes
  9. 8:57Postgres indexes
  10. 9:18Finding bad schemas
  11. 13:36Customer ID
  12. 13:46Create an Index
  13. 14:20Create a Geometry Index
  14. 17:50MultiValue Indexes
  15. 19:29Multiple Column Indexes
  16. 21:38Foreign Keys
  17. 22:31Delete Cascade
  18. 22:52Hash Joints
  19. 24:10Invisible Indexes
  20. 26:14Histograms
  21. 29:22Indexes are fast
~/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.