How Databases Store Data: Pages, Heap Files and Row vs Column Storage
Every query you write becomes disk I/O. Understanding how databases store data — pages, heap files, row vs column layout — explains why some queries are fast and others are not.
Latest articles, tutorials, and deep dives from ndlab tech blog.
Every query you write becomes disk I/O. Understanding how databases store data — pages, heap files, row vs column layout — explains why some queries are fast and others are not.
Normalization keeps data consistent. Denormalization makes reads fast. Every real schema is a trade-off between them — this post teaches you how to make that call deliberately.
A slow query in production is a fire. EXPLAIN plans show exactly where the database wastes time — if you know how to read them. This post teaches you how, with real examples.
Window functions and CTEs turn 20-line subquery nightmares into clean SQL. Master ROW_NUMBER, RANK, LAG/LEAD, recursive CTEs, and the patterns that appear in real codebases.
Race conditions in databases are silent and devastating. This post explains ACID, all four isolation levels, and the concurrency bugs each level prevents — with examples.
Indexes are the biggest lever for database performance — and the most misused. Learn how B-Tree and Hash indexes work, when to add them, and when they hurt more than help.
Results