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 · Data Systems · Data on one machine · about 22 min to read

Play it as a journeyTutor comes with a plan

Storage Engines

Storage Engines
Storage Engines · Open board

The Data Systems track’s take on storage: a database has to put your bytes on a disk and find them again, and there turn out to be exactly two honest ways to do both. This lesson tells the story of each, and by the end you’ll know which one your own database is running.

Before you start. The previous lesson, Data Models and Query Languages, was about the shapes you’re allowed to store your data in: tables, documents, graphs, and the languages you ask questions in. This lesson is about what the database does after you say “save”: how it puts those bytes on a disk, and how it finds them again without reading everything you ever gave it.

Lesson 6 of 24 in Data Systems

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

  • 1960s: the index that grew a tail
  • 1970, Boeing: the page that splits instead of sagging
  • The bill for splitting in place
  • 1996: the ledger too busy to stop and refile
  • 2006: the same shape, at Google’s scale
  • The trade, in one line
  • The LSM engine, run
  • B-trees, in more detail
  • LSM vs B-tree, the comparison to remember
  • The index trade, measured
  • Why analytics wants columns

Terms it explains: index, page, B-tree, SSTable, LSM-tree, WAL, Bloom filter, compaction, tombstones, After the writes, The read path, leaf, branching factor, write-heavy → LSM, write amplification, The price, column store, OLAP, data warehouse, ETL, star schema, LSM, memtable, tombstone.

Lab

Write-heavy wants an LSM, read-heavy wants a B-tree. Where exactly is the flip?

Drag Share of the workload that is reads across its whole range and watch the winner under Who finishes first flip.

Open LSM vs B-tree

Related papers

Review Data Systems