Chris Collins

Tagged “b-tree”

Exploration ·

How a database survives a crash

Pull the plug on a database halfway through a write and it comes back with every committed transaction and none of the half-finished ones. How? Follow a write through the log, the buffer pool and the disk, compare B+trees with LSM-trees, watch compaction, and then see the other half of the promise — what concurrent transactions are allowed to see — with real PostgreSQL and SQLite running between the paragraphs.

Data and event platformsSoftware engineering

Tool ·

SQLite internals

Real SQLite in your browser with a console, and what is underneath: the database file decoded page by page (header, b-tree pages, cell pointers, cells and records, overflow and freelist pages), a b-tree diagram for any table or index, VDBE bytecode annotated opcode by opcode, query plans as trees, the pages each statement writes — and eleven labs from rowid tables to WAL.

Data and event platforms

Tool ·

Storage engines: LSM-tree vs B-tree, simulated

A B+tree and an LSM-tree side by side in your browser, fed the same operations: page splits and merges, the WAL and buffer pool, memtable flushes, leveled, size-tiered and lazy-leveling compaction, Bloom filters, fence pointers and tombstones — with write, read and space amplification counted as you watch, guided scenarios and the textbook cost models.

Data and event platformsSoftware engineering