A deep dive into a database engine internals
summary
Hands-on peek at RavenDB internals: data lives in 8KB pages, indexes use B+Tree layout to minimize seeks (random read latencies jump from ~50ns in RAM to 100,000ns+ on NVMe), large values go to overflow pages, and page splits fragment trees. Durability relies on a write-ahead log with fsync tradeoffs, batching and transaction merging to amortize expensive commits. Concurrency uses page-level MVCC with copy-on-write, writing only page diffs so rollback, crash-recovery and startup replay stay tractable.
AI-written summary · about
chapters (18)
- 0:00Introduction and RavenDB background
- 6:11Database engine internals overview
- 7:15Persistent phone book challenge
- 8:19What is a database engine
- 11:53Cost of disk I/O and data locality
- 14:01B-trees and page-based storage
- 21:52B-trees and memory hierarchy
- 24:41Page splits and fragmentation
- 29:16Clustered vs non-clustered indexes
- 35:36B-tree operations and queries
- 40:59Seek vs scan in B-trees
- 42:05Logical vs physical row IDs
- 47:37Durability challenges in databases
- 50:31fsync limitations and write-ahead logs
- 57:13Transaction models and performance
- 1:02:33Concurrency and MVCC explained
- 1:08:18MVCC in PostgreSQL vs RavenDB
- 1:10:46Optimizing disk writes and batching
