Caffeinated Coder
Book an appointment
Lesson 10 · Design

Indexes in depth

Without an index, a DBMS must read every row to answer WHERE year = 2006. Watch CREATE INDEX copy each year and a pointer to its row into a sorted B-tree, follow a lookup from the root to one leaf and on to one row, walk a range along the linked leaves, and see a full leaf split when a new row arrives. Then read the plan with EXPLAIN and learn what an index costs.

14 min10 steps5 questionsIntermediate
Fig 10 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.