How MVCC Lets Databases Serve Readers and Writers at the Same Time
A long-running report that scans a large table would, under simple locking, either block all writes or see an inconsistent mix of data. Multi-version concurrency control (MVCC) avoids this by keeping several versions of each row instead of overwriting them. Used by PostgreSQL, MySQL's InnoDB, Oracle, and SQL Server with snapshot isolation, it lets readers and writers proceed without blocking each other. Each transaction reads the row version that was current when its snapshot was taken, while newer writes create new versions. Concurrent writes to the same row still conflict, and the outcome depends on the isolation level, with retries required at stricter levels.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in