MVRC Implementation Features
Three data structures are used by Oracle to implement multiversion read consistency:
- Rollback segments
Rollback segments are structures in the Oracle database used to store undo information for transactions in case of rollback. This undo information is used to restore database rows to the state they were in before the transaction in question started. When a transaction starts changing some data in a block, it first writes the old image of the data to a rollback segment. The information stored in a rollback segment is used for two main purposes: to provide the information necessary to roll back a transaction and to support multiversion read consistency.
A rollback segment is different from a redo log. The redo log is used to log all transactions to the database and to recover the database in the event of a system failure, while the rollback segment is used to provide rollback for transactions and read consistency.
Blocks of rollback segments are cached in the System Global Area (SGA) just like blocks of tables and indexes. If rollback segment blocks are unused for a period of time, they may be aged out of the cache and written to disk
- System Change Number (SCN)
In order to preserve the integrity of the data in the database, it is critical to keep track of the order in which transactions were performed. The mechanism Oracle uses to preserve the ordering of transactions with respect to time is the System Change Number, or SCN.
The SCN is a logical timestamp ...
Get Oracle in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.