Commit commit, what did the database do-oracle

Source: Internet
Author: User

Commit is committing a transaction, so what exactly does commit do?

In fact, the commit does not do much, it starts the LGWR process, writes the redo record to the online log, and marks the database header for the modified data as committed. After committing, undo can be overwritten by other transaction calls, and the CKPT process will not write data from the SGA to the data file until a certain condition is reached. Some of the other operations have been done before commit, so even a large amount of data modification does not consume much time in a commit.

Before commit, join an update operation, first in the share pool to parse the build execution plan, and then according to the execution plan to find the data block of the relevant data file, into the Buffcache, and found a can be used in the undo data block, If not, find and call the buff cache from the Undo table space. Put the modified value in the Undo data block, and the modified value is placed in the data block of the relevant data. Record two redo records during data block occurrence, and record redo record number. DML locks are not released until commit or rollback.

It is important to note that rollback consumes resources (for quite a large number of DML operations) because the database does a lot of work before commit.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.