Tensorum

Storage Engines & Indexing

How databases actually lay bytes on disk — and why it shapes your design.

Distributed SystemsAdvanced6 hrs4 key ideas · 5 applied designs
0%
your progress

Overview

How databases actually lay bytes on disk — and why it shapes your design.

Key ideas

  • B-trees update in place: great reads, write amplification on random writes.
  • LSM trees append and compact: excellent write throughput, read amplification mitigated by Bloom filters.
  • Inverted indexes power full-text search; HNSW graphs power approximate nearest-neighbour vector search.
  • MVCC keeps old versions so readers never block writers — and enables time-travel queries.

Trade-offs

  • Compaction competes with foreground traffic for I/O.
  • Vector indexes trade recall for latency and memory.

In the real world

RocksDB (LSM)PostgreSQL (B-tree + MVCC)LuceneFAISS / pgvector

Keywords

LSMB-treeInverted indexHNSWMVCC