Home > Database > Mysql Tutorial > What does sc mean in mysql?

What does sc mean in mysql?

下次还敢
Release: 2024-05-01 20:34:01
Original
551 people have browsed it

In MySQL, "SC" stands for Second Contract, which is a transaction isolation level. The Second Contract isolation level guarantees the read committed, non-repeatable read and phantom read properties, prevents dirty reads and non-repeatable reads, and allows phantom reads. It is often used in applications that require a high degree of consistency and concurrency.

What does sc mean in mysql?

SC in MySQL

In MySQL, the abbreviation "SC" stands for "Second Contract", which means The second type of contract. It is a transaction isolation level that provides higher visibility to concurrent transactions.

Second Contract isolation level

Second Contract isolation level guarantees the following properties:

  • Read Committed (RC): Transactions can only read changes made by committed transactions.
  • Non-Repeatable Read (NRR): Within the same transaction, multiple reads of the same row will not return different results, even if other transactions were performed on the row submit.
  • Phantom read (PR): A transaction will not see new rows inserted by other transactions until the transaction commits.

Comparison with other isolation levels

The comparison between the Second Contract isolation level and other isolation levels is as follows:

Isolation level Read committed Non-repeatable read Phantom read
ReadSubmitted
Repeatable Read
Serializabl
Second Contract

Use Scenario

Second Contract isolation level is typically used in applications that require a high degree of consistency and concurrency. It prevents dirty reads and non-repeatable reads while allowing phantom reads.

The Second Contract isolation level can be used in the following situations:

  • Need to ensure a high degree of consistency between transactions.
  • Dirty reads and non-repeatable reads need to be avoided.
  • Phantom reading is acceptable.

The above is the detailed content of What does sc mean in mysql?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template