Commit is a very fast operation. When we release the commit command, the really difficult operation has been completed,
Data changes have been performed in the database, so 99% of the tasks have been completed. For example, the following operations have been generated:
1. The undo block has been generated in the SGA (buffer cache;
2. A changed data block and index block have been generated in the SGA (buffer cache;
3. The redo information of the first two items is generated in the redo log buffer;
4. Depending on the data size produced by the first three items and the time required for the operation, the data in the buffer may have been
Some of them are output to the disk;
5. All required locks have been obtained;
When you run the commit command, only the following operations are performed:
1. Generate SCN for the transaction: SCN is a timing information of the Oracle database, to ensure the order of the transaction,
It is also used for failed recovery and database read consistency and checkpoint, no matter when someone submits, SCN
Automatically add 1;
2. Write the redo information related to the transaction not written to the redo log file from the redo log buffer to the redo log
File, this is the actual commit. After this step is completed, it indicates that the commit has been completed, and the transaction is
Remove from V $ transaction;
3. the locks of the transaction recorded in the V $ lock will be released, and other transactions requiring these locks will be awakened;
4. Execute block cleaning to clear the transaction information stored in the block header;