Introduction to storage
easy 24 minHow a database keeps data: pages on disk, a buffer pool of pages in memory, indexes that find the right page, and a write-ahead log that makes a commit survive a crash.
What each level should show
The same question is judged differently for mid, senior and staff.
Mid
Must show
- Explains pages and the buffer pool
- Knows that the log is flushed before the confirmation
- Says what an index saves and costs
Will be probed on
- What is lost in a power cut
- Why random reads are slow
Stands out
Counts page reads for a query.
Senior
Must show
- Describes checkpoint and recovery
- Computes the effect of the hit rate
- Explains torn pages and group commit
Will be probed on
- Scans and LRU
- When a scan beats an index
Stands out
Names the flush setting and what it risks.
Staff
Must show
- Chooses an engine from the workload
- Sets recovery time targets
- Separates durability on one node from replication
Will be probed on
- Cost of memory against disk reads
- What to measure first
Stands out
Connects the storage choice to what the business can afford to lose.