Every backend engineer has run SELECT * FROM users WHERE id = 42 a thousand times.
Most assume the database goes and grabs exactly that one row.
But it doesn't. It can't.
Disks read in fixed-size blocks, not single rows — so databases define their own unit for this: a page. Every read pulls the whole page, then selects the row from it.
That one fact explains a lot — why deleted rows don't vanish immediately, why a table's file is bigger than its raw data, why "no index" means scanning every single page, and why an index actually works (it's just a sorted shortcut to a page + slot).
I wrote a deep dive on pages, slotted pages, heap files, and full table scans — the physical layer underneath every SQL query: https://jishnusaha.me/blog/database/how-db-store-data
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)