Compare

Side-by-side on the decisions that recur: index vs scan, normalize vs denormalize, optimistic vs pessimistic, partition vs shard, and more — with when to choose each.

B+ tree storage engineLSM tree storage engine
Point readheight + 1 page reads; one structurememtable, then each level; bloom filters skip most files
Range scanleaf chain, sequentialk-way merge across memtable and SSTables
Write pathfind leaf, modify in place, maybe split; random page writesappend to WAL + memtable; sequential flushes
Write amplificationpage-granular: a 100 B update rewrites 8 KB (+WAL)compaction rewrites data several times (leveled ~10× per level)
Read amplificationlow and predictablegrows with number of levels / files; needs bloom filters
Spacepages partially full after splits/deletesstale versions until compaction; tombstones
Background workvacuum / merge, checkpoint flushingcompaction — competes for I/O, can stall writes
Cachingbuffer pool of pages; upper levels stay hotblock cache + OS cache; immutable files are easy to cache
ExamplesPostgreSQL, InnoDB, SQLite, WiredTigerRocksDB, LevelDB, Cassandra, HBase, ScyllaDB
Choose this whenRead-heavy or mixed OLTP, point lookups and range scans with predictable latency; the dataset and indexes are updated in place.Write-heavy ingest (events, time series, logs), sequential-friendly storage, tolerance for compaction and slightly higher read cost.