Skip to content

3.4. Storage Engines and Data Structures

Underneath every database is a storage engine deciding how bytes hit the disk, and that decision fixes the workload the database is good at. The central trade-off is LSM-tree versus B-tree: one optimizes writes by turning them sequential and paying at read time, the other optimizes reads and pays at write time. This chapter covers both, the data structures that make them practical (SSTables, memtables, Bloom filters), the write-ahead log that guarantees durability, and columnar layouts that flip the whole model for analytics.