当前位置:网站首页>【硬记】脏读、不可重复读、幻读场景核心区别
【硬记】脏读、不可重复读、幻读场景核心区别
2022-06-13 07:04:00 【万物皆字节】
我觉得脏读可以单独来看,不可重读和幻读可以对比记忆
脏读
场景
A事务修改了数据,此刻B事务读取到了这个数据,并用这个数据做了逻辑处理;然后A事务由于某种原因把刚刚提交的数据回退了,但是B事务不知道这回事做了正常的事务提交;关注点
脏读引起的一个最大问题就是脏写
不可重复读
场景
A连接一开始查询数据时1,但是后面查询的数据是2,因为中途B连接将数据改成了2,这个时候就是两次查询数据不一致的问题关注点
B连接将A连接能查询到的数做了 修改
幻读
场景
在一个事务的两次查询中数据笔数不一致,例如A事务查询了几列(Row)数据,而另一个B事务却在此时插入了新的几列数据,先前的A事务在接下来的查询中,就会发现有几列数据是它先前所没有的。关注点
B事务在A事务能查询到的数据范围内 新增了数据
对比
不可重复读 关注点在数据修改,幻读 关注点在数据的新增
边栏推荐
- Tidb execution plan -- II
- How to make a development board from scratch? Illustrated and illustrated, step by step operation for you to see.
- Intelligent entertainment has developed steadily, and jinglianwen technology provides data collection and labeling services
- AIO Introduction (VIII)
- 简单了解C语言基本语
- Tidb dashboard modify port
- Micro isolation (MSG)
- Xuanwu cloud technology passed the listing hearing: the performance fluctuated significantly, and chenyonghui and other three were the controlling shareholders
- 【腾讯阿里最全面试题集锦】(四面:3轮技术+1轮HR)
- That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
猜你喜欢

JS case Xiaomi second kill countdown New Year Countdown

RT thread simulator lvgl control: switch switch button control

简单了解C语言基本语

Network planning common interview knowledge (I)

The new retail market has set off blind box e-commerce. Can the new blind box marketing model bring dividends to businesses?

In the era of membership based social e-commerce, how do businesses build their own private domain traffic pool?

Lightning breakpoint continuation

June 12, 2022: if there are n*n pieces in an n*n square chessboard, each grid can have exactly one piece. But now some pieces are gathered on a grid, such as 2030100300. The above two-dimensional arra

上位机开发(固件下载软件之详细设计)

Ticdc introduction
随机推荐
Will the chain 2+1 model be a new business outlet and a popular Internet e-commerce market?
DM Experiment 6: filter replication
不间断管理设计
2022 - 06 - 12: dans un échiquier carré n * N, il y a n * n pièces, donc chaque pièce peut avoir exactement une pièce. Mais maintenant quelques pièces sont rassemblées sur une grille, par exemple: 2 0
ISIS的vsys(虚拟系统)
髋关节MR详细图谱(转载)
Micro isolation (MSG)
面试必刷算法TOP101之单调栈 TOP31
Uploading and retrieving stored images in localstorage
杭州证券开户是安全的吗?
上位机开发(固件下载软件之架构设计)
FSM state machine
How to seize the bonus of social e-commerce through brand play to achieve growth and profit?
上位机开发(固件下载软件之详细设计)
10 Honest Facts I Want To Share With All Junior Developers
Detailed description of drawing ridge plot, overlapping densities of overlapping kernel density estimation curve, facetgrid object and function sns Kdeplot, function facetgrid map
线程池中的 工作线程如何被回收
Soup side (8)
Monotone stack top31 of interview must brush algorithm top101
【转】FPGA面试题