当前位置:网站首页>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
边栏推荐
- What is a blocking queue? What is the implementation principle of blocking queue? How to use blocking queue to implement producer consumer model?
- Wechat payment function
- Introduction to raspberry pie 3B - system installation
- 和谐宿舍(线性dp / 区间dp)
- [2022 ICLR] Pyramid: low complexity pyramid attention for long range spatiotemporal sequence modeling and prediction
- 退出vim的方法
- [winui3] Écrivez une copie du gestionnaire de fichiers Explorer
- Simply drag objects to the item bar
- Use model load_ state_ Attributeerror appears when dict(): 'STR' object has no attribute 'copy‘
- Unity rawimage background seamlessly connected mobile
猜你喜欢

Opencv + clion face recognition + face model training

【数据库】MySQL单表查询

Deep learning notes - semantic segmentation and data sets

Wine (COM) - basic concept

Introduction to raspberry pie 3B - system installation
![[2021] Spatio-Temporal Graph Contrastive Learning](/img/7d/67a0bfa0adecee24bbe291a25ae906.png)
[2021] Spatio-Temporal Graph Contrastive Learning

Excel uses the functions of replacement, sorting and filling to comprehensively sort out financial data
![[2022 ICLR] Pyraformer: Low-Complexity Pyramidal Attention for Long-Range 时空序列建模和预测](/img/7c/51ac43080d9721f1bdc1cd78cd685b.png)
[2022 ICLR] Pyraformer: Low-Complexity Pyramidal Attention for Long-Range 时空序列建模和预测

COM in wine (2) -- basic code analysis

Deep learning notes - fine tuning
随机推荐
HRegionServer的详解
The unity camera rotates with the mouse
Mac 进入mysql终端命令
Innovation training (V) mid term inspection
List remove an element
[winui3] Écrivez une copie du gestionnaire de fichiers Explorer
Leetcode 1547: minimum cost of cutting sticks
信息学奥赛一本通 1212:LETTERS | OpenJudge 2.5 156:LETTERS
Unity3d practical skills - theoretical knowledge base (I)
redis数据类型有哪些
PHP counts the number of files in the specified folder
使用model.load_state_dict()时,出现AttributeError: ‘str‘ object has no attribute ‘copy‘
How to exit VIM
DIY is an excel version of subnet calculator
Unity攝像頭跟隨鼠標旋轉
MySQL - index
Sword finger offer: push in and pop-up sequence of stack
Graduation project
leetcode——启发式搜索
Sword finger offer: the median in the data stream (priority queue large top heap small top heap leetcode 295)