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 08 · From Scratch · LSM Tree · with code: Go · about 12 min to read

Play it as a journeyTutor comes with a plan

LSM 03-04: Table Files and the Sparse Index

Storage Extras
Storage Extras · Open board

The Data Systems board that adds the pieces around the two storage engines, including how a log-structured engine keeps its files findable. This lesson builds the file and the index into it. Part of the LSM series, Build Your Own LSM Tree.

Before you start. This series builds a small copy of a storage engine that never edits a file in place. LSM 01-02: The Memtable and the Log built the sorted memtable and the log that protects it. Both live in memory and a log that only grows. This lesson builds the step the whole design is named for: writing the memtable to disk as a sorted file, and finding a key in that file without reading all of it.

Lesson 57 of 117 in From Scratch

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

  • 2006: “a lookup can be performed with a single disk seek”
  • A flush, and why it has an order
  • Finding a key without reading the file
  • Stage 03: the flush
  • Stage 04: the index
  • The tests
  • Break it, three ways

Terms it explains: index, footer, sparse, concatenated index, data cube, edit distance, fact/dimension table, full-text index, Lucene, materialized view, multi-dimensional index, projection, R-tree, star vs snowflake schema.

Review From Scratch