Multiversion Concurrency Control

Multi- version concurrency control (MCC, MVCC, multi- generational concurrency control ) is a method of the database technique, which is used to perform concurrent access to a database as efficiently as possible without blocking or endangering the consistency of the database.

This ensures that a transaction never has to wait for database objects. To this end, internally different versions of an object are held, which are distinguished from each other, eg by timestamps or continuously increased transaction numbers. Each object version has then a time stamp from the time of their writing by any transaction Tbel, in this way, transaction Ti read the current version of the object whose time stamp is less than TS (Ti), that is, by the transaction

Was written.

Each object has P as a read timestamp RTS ( P) (read timestamp), the start time stamp TS ( Tnew ) of the specific transaction Tnew indicates that P has recently read. If this object Ti P changes and TS (Ti) < RTS ( P) = TS ( Tnew ) holds, then the transaction Ti is aborted and restarted. Otherwise, Ti creates a new version of P and sets the Lese-/Schreib-Zeitstempel from P to TS (Ti).

The disadvantage of this system is the cost to maintain many different versions of an object in the database. On the other hand, read accesses will never be blocked, which can be loaded with databases very important, where very often only read.

Database with MVCC

Many of the database systems available today implement this technique:

  • ArangoDB
  • Berkeley DB
  • CouchDB
  • Firebird (database)
  • FLAIM
  • GraphDB ( sones )
  • H2 Database Engine (experimental, version 1.0.57 (25 August 2007) )
  • InterBase ( all versions )
  • Microsoft SQL Server ( SQL Server 2005, but using older versions, inter alia, row-level -locking )
  • MySQL when using the InnoDB storage engine or Falcon.
  • ObjectStore ( in read-only mode)
  • Oracle
  • PostgreSQL and PostgreSQL derivatives such as Netezza
  • SAP HANA
  • ThinkSQL
  • Zope Object Database
586612
de