Performance Internals
Why is it slow, one layer down: page reads, buffer misses, scan choice, index maintenance, WAL, compaction — and one central simulator to turn the knobs.
EXPLAIN names the slow node; the internals layer explains its price. Every slow query is some number of page reads times the fraction that missed the buffer pool, and every slow write is index pages dirtied, an fsync, a lock wait or a compaction debt — each with a metric that exposes it and a lesson one layer down.
Five knobs — storage engine, rows, RAM, index, workload — and one thousand operations. The simulator turns the mechanisms of the internals layer into a page budget you can watch move: hits and misses, storage reads and writes, index depth, WAL, compaction, amplification and latency, with two configurations side by side.