Home>Article>Database> What is the default transaction isolation level of mysql?

What is the default transaction isolation level of mysql?

青灯夜游
青灯夜游 Original
2019-04-24 17:39:52 79797browse

There are 4 isolation levels for mysql database transactions, and the default transaction processing level is [REPEATABLE-READ], which is repeatable reading.

What is the default transaction isolation level of mysql?

The operating environment of this article: windows7 system, mysql8 version, Dell G3 computer.

There are 4 isolation levels for mysql database transactions, and the default transaction processing level is [REPEATABLE-READ], which is repeatable reading.

The following article will take you to understand the isolation levels of these four transactions of mysql. I hope it will be helpful to you.

The SQL standard defines four types of isolation levels, including some specific rules to limit which changes inside and outside the transaction are visible and which are invisible. Lower isolation levels generally support higher concurrency and have lower system overhead.

MySQL’s 4 transaction isolation levels are as follows:

1. Read Uncommitted (Read Uncommitted): Dirty reads are allowed, which means that uncommitted transactions in other sessions may be read. Modified data

2. Read Committed: Only submitted data can be read. Most databases such as Oracle default to this level (no repeated reads)

3. Repeated Read: Repeatable Read. Queries within the same transaction are consistent at the start of the transaction, InnoDB default level. In the SQL standard, this isolation level eliminates non-repeatable reads, but phantom reads still exist, but innoDB solves phantom reads

4. Serializable: Completely serialized reads, each time Both reading and writing need to obtain table-level shared locks, and reading and writing will block each other

Recommended related mysql video tutorials: "mysql tutorial"

The above is the detailed content of What is the default transaction isolation level of mysql?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:what is apache server Next article:what is apache server