当前位置:网站首页>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
边栏推荐
- View analysis of scenic spots in ArcGIS
- Innovation training (V) configuration information
- Com alibaba. Common methods of fastjson
- [WinUI3]编写一个仿Explorer文件管理器
- The unity camera rotates with the mouse
- JS determines whether the numeric string contains characters
- Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
- The 8 diagrams let you see the execution sequence of async / await and promise step by step
- Excel protects worksheets and workbooks from damage
- Use AES encryption - reuse the wisdom of predecessors
猜你喜欢
DIY is an excel version of subnet calculator
PHP+MySQL 制作留言板
使用model.load_state_dict()时,出现AttributeError: ‘str‘ object has no attribute ‘copy‘
【数据库】表的查看、修改和删除
[winui3] Écrivez une copie du gestionnaire de fichiers Explorer
Learning Android V from scratch - UI
直播带货表格模板-自动显示图片-自动关联系列商品
Use the built-in function of win to transfer files between two computers in the same LAN (the speed is the same as that between local disks)
Perfect test of coil in wireless charging system with LCR meter
《2021多多阅读报告》发布,95后、00后图书消费潜力攀升
随机推荐
redis和mysql区别
洛谷P2731骑马修栅栏
Com alibaba. Common methods of fastjson
[database] MySQL single table query
Day.js 常用方法
C# List字段排序含有数字和字符
Special topic of data intensive application system design
Innovation training (VII) FBV view & CBV view
[2021] Spatio-Temporal Graph Contrastive Learning
HRegionServer的详解
What's the difference between error and exception
Pixel mobile phone brick rescue tutorial
The 2021 more reading report was released, and the book consumption potential of post-95 and Post-00 rose
Learning Android from scratch -- Introduction
Use the built-in function of win to transfer files between two computers in the same LAN (the speed is the same as that between local disks)
QPushButton slot function is triggered multiple times
JS generates a specified number of characters according to some words
深度学习笔记 —— 语义分割和数据集
The difference between static pipeline and dynamic pipeline
The unity camera rotates with the mouse