Show in graph
DB

Software → Databases

MVCC

A concurrency-control technique where readers can see consistent versions while writers create new versions.

Motivation

MVCC solves the problem of letting readers and writers work concurrently without blocking each other unnecessarily.

Where it fits

It belongs to database transactions and concurrency control.

Mental model

Instead of one changing row, the database keeps versions. Readers see a consistent version while writers create new ones.

Important details

MVCC is closely related to isolation levels, snapshots, transaction IDs, and cleanup of old versions.

Common mistakes

  • Assuming MVCC removes all locking.
  • Forgetting that old versions must eventually be cleaned up.