当前位置:网站首页>Transaction isolation level of MySQL transactions
Transaction isolation level of MySQL transactions
2022-04-23 04:59:00 【GreatorMan】
The underlying implementation of transaction isolation level is very complex , In normal development, we will set the isolation level of transactions according to different scenarios . The isolation level of a transaction specifies the data visibility in a transaction 、 Operability 、 lock . The higher the isolation level of the transaction , The system supports lower concurrency , The lower the isolation level , On the contrary, the lower the support .
The isolation level of transactions is divided into :
Read uncommitted (READ UNCOMMITED)
Read uncommitted level , The application can read data that is not committed by other transactions . That is, the data not committed by the transaction is visible to other transactions , I.e. dirty reading . As shown in the figure below :
Read the submission (READ COMMITED)
Read submit level , A transaction cannot read data that is not committed by other transactions . Other affairs , The data read again by the transaction may be inconsistent with the data obtained for the first time, that is It can't be read repeatedly , It cannot be read repeatedly because other transactions modify 、 New lead . As shown in the figure below :
Repeatable (REPEATABLE READ)
Repeatable reading solves dirty reading , Ensure that the data read multiple times is consistent , However, during range query, other transaction queries will read the new data of other transactions , That is, unreal reading .MYSQL Through the storage engine MVCC Multi version concurrency control solves the unreal reading problem .
Repeatable reading is MYSQL Default isolation level . Here's the picture :
Serialization (SERIALIZABLE)
Serialization can solve the problem of unreal reading , But he will read every row of data and lock it , The competitive resources of locks are relatively large .
Transaction level
Transaction level | Dirty reading | The possibility of non repetition | The possibility of unreal reading | Lock reading |
Read uncommitted | YES | YES | YES | NO |
Read the submission | NO | YES | YES | NO |
Repeated reading | NO | NO | YES | NO |
Serializable | NO | NO | NO | YES |
版权声明
本文为[GreatorMan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220553102010.html
边栏推荐
- MySQL -- execution process and principle of a statement
- Graduation project
- Introduction to raspberry pie 3B - system installation
- Record the ThreadPoolExecutor main thread waiting for sub threads
- Better way to read configuration files than properties
- Innovation training (10)
- 用LCR表完美测试无线充电系统中的线圈
- Informatics Olympiad 1955: [11noip popularization group] Swiss round | openjudge 4.1 4363: Swiss round | Luogu p1309 [noip2011 popularization group] Swiss round
- Innovation training (VII) FBV view & CBV view
- Details related to fingerprint payment
猜你喜欢
跨境电商 | Facebook 和 Instagram:哪个社交媒体更适合你?
[2021] Spatio-Temporal Graph Contrastive Learning
Sword finger offer: the path with a certain value in the binary tree (backtracking)
Repair of self calibration SPC failure of Tektronix oscilloscope dpo3054
Detailed explanation of the differences between TCP and UDP
Customize the navigation bar at the top of wechat applet (adaptive wechat capsule button, flex layout)
2022/4/22
深度学习笔记 —— 微调
MySQL - index
Innovation training (VI) routing
随机推荐
Detailed explanation of the differences between TCP and UDP
Deep learning notes - semantic segmentation and data sets
leetcode——启发式搜索
MySQL -- execution process and principle of a statement
JS détermine si la chaîne de nombres contient des caractères
What are instruction cycles, machine cycles, and clock cycles?
Use model load_ state_ Attributeerror appears when dict(): 'STR' object has no attribute 'copy‘
CLion+OpenCV identify ID number - detect ID number
What are the redis data types
ApplicationContext injection bean
SCP command details
View analysis of scenic spots in ArcGIS
Deep learning notes - object detection and dataset + anchor box
Innovation training (IX) integration
The object needs to add additional attributes. There is no need to add attributes in the entity. The required information is returned
HRegionServer的详解
Details related to fingerprint payment
解决ValueError: Argument must be a dense tensor: 0 - got shape [198602], but wanted [198602, 16].
How to exit VIM
What's the difference between error and exception