Skip to content
Theory · How to Choose a Database · lesson 5 of 18

LSM tree vs B-tree

In the last lesson, the clerk with booklets only appended, and so he outran the clerk who corrects pages in place. Does that make the LSM tree better than the B-tree? No. Both clerks pay for their speed, only in different places: one when writing, the other when reading and in the background.

In this lesson

  • The B-tree: correction in place
  • Three kinds of amplification
  • How to compact
  • What to choose
  • Common mistake
  • Key points