intermediateDurability

Why does the database write to a separate log before updating the real data files?

Sequential log appends are much faster than in-place updates to indexed data files, and the log lets a crash mid-update be safely recovered by replaying it, rather than risking a corrupted data file.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to What's the practical risk of setting synchronous_commit = off on a payments database?← Back to all Transaction Mastery questions