Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Database Internals · One Database, to the Bolt · about 24 min to read

Play it as a journeyTutor comes with a plan

B-Tree on Disk

B-Tree on Disk
B-Tree on Disk · Open board

The board behind the index you’ve been using without knowing its shape, part of Database Internals, the deep-dive set. By the end of this lesson you’ll know why one page-sized decision turns a billion-row search into four stops, and one added arrow kept that search safe while somebody else was rearranging the pages underneath it.

Before you start. WAL & Recovery showed you that every change is written to a log and flushed to disk before its commit is confirmed, so a crash can always be replayed back to where it left off. This lesson is about the structure that log is protecting, the actual arrangement of pages your rows sit inside, and why finding one of a billion of them takes a blink.

Lesson 6 of 26 in Database Internals

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • A billion rows, and the answer comes back before you blink
  • One page, one stop: fitting a billion rows into four hops
  • The floor that never tips: what happens when a page fills up
  • 1981: the reader that walked straight into a page that had just moved

Terms it explains: index, B-tree, split, leaves, right-link, B+tree, index-only scan, HOT update, log-structured merge tree, hash index, Extendible hashing, Linear hashing.

Related papers

Review Database Internals