Database Transaction ISOLATION LEVEL

Source: Internet
Author: User

Characteristics of the transaction: ACID

Atomicity: atomicity

Consistency: Consistency

Isolation: Isolation

Duration: Persistence

The four isolation levels for transactions are defined in the SQL standard:

1,read UNCOMMITTED UNCOMMITTED Read

Modifications in the transaction, even if they are not committed, are visible to other transactions. That is, a transaction can read uncommitted data, which results in dirty reads.

2,read committed Submit Read

The majority system is this level, Oracle is this level, but MySQL is not at this level.

The transaction level definition: At the beginning of a transaction, you can only "see" the changes that have been made to the transactions that have been submitted. In other words, any changes you make to a transaction from start to commit are not visible to other transactions.

3,repeatable Read Repeatable reads

Transactions that read data prohibit write transactions (but allow read transactions), and write transactions prohibit any other transactions. MySQL is at this level by default.

4,serializable can be serialized

It is the highest isolation level, and serializable locks on every row of data read, so it can cause a large number of timeouts and lock contention issues.

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.