In this lesson · topic 7 of 7
Topic 7
Pages, splits and the log
3 min read
Predict first
Predict first
Predict first
Take away
- A disk reads pages, so a B-tree makes each node a page of many keys and stays shallow.
- A lookup reads one page per level. The top levels stay in memory.
- An insert into a full page splits it, and splits can climb to the root.
- A page is much bigger than a record, so every write is amplified. Random keys make it worse.
- A write-ahead log makes a change durable with one small append, and lets dirty pages wait.
- Checkpoint spacing trades page writes against recovery time.
Sources
- Douglas Comer, The Ubiquitous B-Tree, ACM Computing Surveys, 1979.
- Rudolf Bayer and Edward M. McCreight, Organization and maintenance of large ordered indexes, Acta Informatica, 1972.
- Goetz Graefe, Modern B-Tree Techniques, Foundations and Trends in Databases, 2011.
- C. Mohan, Don Haderle, Bruce Lindsay, Hamid Pirahesh and Peter Schwarz, ARIES: A Transaction Recovery Method Supporting Fine-Granularity Locking and Partial Rollbacks Using Write-Ahead Logging, ACM Transactions on Database Systems, 1992.