LESSON 33.27 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Database indexes
Watch a database price a full scan against an index, then pick one.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 33.27 · INDEX BAY4 OF 64 ROWS MATCH · 16 PAGES
01
Stage 1 of 6 · The table
The table keeps 64 rows in 16 heap pages, in arrival order. The query matches 4 rows.
Explain it simply
Each small box is one request in a log, with its tenant's first letter and its minute. A page, the block the database reads in one go, holds 4 rows. The blue boxes are the rows the query wants.
16 pages of 4 rows. 4 rows match the query and are marked.
rows and index keysmatching rows, chosen planpages read, costrows fetched for nothingindex it cannot use
Toy: 64 rows, 16 pages, 8 leaves
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Selectivity is the share of rows the query keeps.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.