A Deep Dive Into Database Internals
summary
Walks through concrete internals: data laid out in fixed 4KB pages, B+Tree page splits change tree height so sequential inserts cut IO, large records become overflow pages and compaction can force roughly 2x disk needs. Explains durability via write-ahead log, fsync pitfalls (macOS often no-op), preallocating logs, and partial-write validation. Shows MVCC by copy-on-write pages and a page-translation table, and claims a single-writer model cuts lock-management overhead (about 40% of DB CPU). Recovery examples: naïve replay can take hours on cloud storage, optimized replay drops to minutes.
AI-written summary · about
chapters (10)
- 0:00Start
- 4:26What does a database do?
- 6:38The baseline
- 11:26Putting the data on disk
- 14:41Database secret sauce!
- 26:18How do you implement this?
- 32:30Fsync gate
- 33:48Durability? What about rollback?
- 42:22Page Transaction Table (PTT)
- 45:06Communication model, again
related talks
49mHow Databases Work - For Developers, Accidental DBA's and Managers
49mBuild a database from the ground up
34mWhat We Talk About When We Talk About Disk IO
35mQuestioning Database Claims: Design Patterns of Storage Engine
53mIndexing Internals for Developers & DBAs
01h 16mDeep Dive into On-Disk Data Structures
53mSQL Server Internals: The Practical Angle
52mHow shit works: Databases
