All Questions
Scaling Writes medium

To ensure durability, databases write changes to a 'Write-Ahead Log' (WAL) on disk *before* modifying the actual data files. Why?

  1. A To compress the data.
  2. B Appending to a log file is a fast sequential I/O operation. Randomly updating the main data pages is slow. The WAL ensures data is saved quickly and safe from crashes.
  3. C To prevent SQL injection.
  4. D To make backups easier.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions