Skip to main content

What Are Log Buffers and How Do Log Flushes Work?

Senior MS SQL
Quick Answer Log records are written to in-memory log buffers first, then flushed to disk on transaction commit, every 60KB of log buffer, or every second. COMMIT can't return until the log record is hardened to disk รขโ‚ฌโ€ that's what makes transactions durable. Log flushes are sequential writes รขโ‚ฌโ€ far faster than random data page I/O.

Answer

Changes go to an in-memory log buffer. A log flush occurs:

  • On transaction commit
  • When buffer fills
  • On checkpoint

Slow log storage = slow commits.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice