DSA Factory
Free Indexes, queries and scale lessonsIndexes, queries and scale · Stage 0 · Where the data lives · Step 1

Rows, pages and the cost of a scan

See how rows are packed into fixed-size pages, why the page is the unit of cost, and how to estimate a full scan. About 12 minutes.

Quick check

A table has 10 million 200-byte rows on 8,192-byte pages. About how many pages is it?

  1. AAbout 250,000
  2. BAbout 10 million
  3. CAbout 25,000
Show the answer

About 250,000. 40 rows per page, so 10,000,000 / 40 = 250,000 pages.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve