{
  "slug": "lsm-tree",
  "term": "Log-structured merge-tree",
  "aliases": [
    "LSM-tree",
    "LSM tree",
    "log structured merge tree"
  ],
  "definition": "A write-oriented index that buffers updates and merges sorted components over time, trading write batching against read and compaction work.",
  "note": "In RocksDB leveled compaction, L0 files may overlap, while higher levels partition a sorted run across non-overlapping SST files. One file per level is not a faithful description.",
  "related": [
    "bloom-filter",
    "sstable",
    "write-amplification",
    "lsm-tombstone"
  ],
  "citations": [
    {
      "id": "rocks-levels",
      "title": "RocksDB project. Leveled Compaction: sorted levels, SST files and overlapping L0. Documentation reviewed 12 October 2026.",
      "url": "https://github.com/facebook/rocksdb/wiki/Leveled-Compaction",
      "accessed": "2026-10-12"
    },
    {
      "id": "leveldb",
      "title": "LevelDB project. Implementation: log files, sorted tables and compaction. Documentation reviewed 12 October 2026.",
      "url": "https://github.com/google/leveldb/blob/main/doc/impl.md",
      "accessed": "2026-10-12"
    },
    {
      "id": "hesela",
      "title": "Hesela: Bloom filters and the cost of an absent LSM lookup",
      "url": "https://hesela.com/analyses/bloom-filters-lsm-read-cost/",
      "accessed": "2026-10-12"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-12"
}
