Section 2: Systems Basics

You know SQL and the architectural tradeoffs. Now we look at how a database executes those operations.


The Key Problems We Solve

1. The I/O Bottleneck

Where the data sits sets the speed. Disk is far slower than RAM.

  • The Problem: Why is one query instant while another stalls the whole server?

  • The Fix: An I/O Cost Model that counts disk reads, plus paging: moving data in fixed-size blocks so the database touches disk as rarely as possible.

2. The Search Problem

Reading a billion rows to find one is too slow.

  • The Problem: How does a system find a record, or prove it is not there, without scanning every row?

  • The Fix: Basic Hashing and Bloom Filters. They locate a record, or rule it out, in one lookup instead of a full scan.

3. The Physical Constraints Problem

Storing petabytes costs real money.

  • The Problem: How do you hold that much data without the storage bill and read times blowing up?

  • The Fix: Compression. Trade CPU cycles to fit the same data in fewer bytes, so each disk read carries more of it.


Let's peek under the hood.