当前位置:网站首页>【硬记】脏读、不可重复读、幻读场景核心区别
【硬记】脏读、不可重复读、幻读场景核心区别
2022-06-13 07:04:00 【万物皆字节】
我觉得脏读可以单独来看,不可重读和幻读可以对比记忆
脏读
场景
A事务修改了数据,此刻B事务读取到了这个数据,并用这个数据做了逻辑处理;然后A事务由于某种原因把刚刚提交的数据回退了,但是B事务不知道这回事做了正常的事务提交;关注点
脏读引起的一个最大问题就是脏写
不可重复读
场景
A连接一开始查询数据时1,但是后面查询的数据是2,因为中途B连接将数据改成了2,这个时候就是两次查询数据不一致的问题关注点
B连接将A连接能查询到的数做了 修改
幻读
场景
在一个事务的两次查询中数据笔数不一致,例如A事务查询了几列(Row)数据,而另一个B事务却在此时插入了新的几列数据,先前的A事务在接下来的查询中,就会发现有几列数据是它先前所没有的。关注点
B事务在A事务能查询到的数据范围内 新增了数据
对比
不可重复读 关注点在数据修改,幻读 关注点在数据的新增
边栏推荐
- Can flush open a stock account? Is it safe?
- 杭州证券开户是安全的吗?
- RT thread simulator lvgl control: button button style
- RT thread simulator lvgl control: switch switch button control
- 同花顺可以开股票账户吗?安全吗?
- What is the essence of social e-commerce disruption? How can businesses get more traffic?
- Continuous management design
- Differences between SQL and NoSQL of mongodb series
- 髋关节MR详细图谱(转载)
- Detailed description of drawing ridge plot, overlapping densities of overlapping kernel density estimation curve, facetgrid object and function sns Kdeplot, function facetgrid map
猜你喜欢
RT-Thread 模拟器 simulator LVGL控件:switch 开关按钮控件
线程池中的 工作线程如何被回收
SDN basic overview
Try to use renderdoc to view the shader code of UE
Upper computer development (detailed design of firmware download software)
Do you want to carry out rapid steel mesh design and ensure the quality of steel mesh? Look here
2022-06-12:在N*N的正方形棋盤中,有N*N個棋子,那麼每個格子正好可以擁有一個棋子。 但是現在有些棋子聚集到一個格子上了,比如: 2 0 3 0 1 0 3 0 0 如上的二維數組代錶,一
15、 IO stream (I)
[weak transient signal detection] matlab simulation of SVM detection method for weak transient signal under chaotic background
基于SSM实现水果商城批发平台
随机推荐
Tidb index optimization
Network planning common interview knowledge (I)
105. constructing binary trees from preorder and inorder traversal sequences
Xiaomi's one-sided interview questions (self sorting answers)
Uploading and retrieving stored images in localstorage
Database connection under WinForm
Tidb implementation plan -- III
The biggest highlight of wwdc2022: metalfx
. Net code to implement get request and post request
Tidb statistics
Related operations under Oracle Database
【马尔科夫链-蒙特卡罗】马尔科夫链-蒙特卡罗方法对先验分布进行抽样
Ml: introduction to stability analysis of machine learning model and detailed introduction to common solutions
Learning notes of MySQL series by database and table
Micro isolation (MSG)
Test development programmers, are you still confused? You can't define yourself as a yard farmer
髋关节MR详细图谱(转载)
Tidb execution plan -- II
ML之FE:Vintage曲线/Vintage分析的简介、计算逻辑、案例应用之详细攻略
16、 IO stream (II)