Four isolation levels for database transactions

Source: Internet
Author: User

There are 4 isolation levels for database transactions, from low to High:

Read UNCOMMITTED READ UNCOMMITTED read not authorized Read to allow other
Two transactions cannot be written at the same time
Transaction B reads transaction A for the submitted data Avoid dirty reads when updates are lost
Read committed Authorize read Read commit Read to allow other uncommitted transactions to prevent other transactional accesses from being made Transaction a reads data transaction b changes data transaction A reads B changed data, inconsistent results Prevent Dirty reads from appearing as non-repeatable reads (duplicate read results are different)
REPEATABLE READ REPEATABLE READ Read does not allow write transactions to write prohibit other transactions from being made Transaction a reads R1 and modifies R2 transaction B cannot modify R1 and read r2,b does not affect a If a contains a statistic that records a range of operations, and B just inserts a record within the range, causing a phantom read REPEATABLE READ
There will be Phantom reads
Serializable Serialization of Transactions can only be executed one after another, not concurrently Highest transaction isolation level, low performance, typically rarely used Avoid dirty reading , avoid non-repetition reading , avoid phantom reading

Four isolation levels for database transactions

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.