当前位置:网站首页>MySQL intent lock
MySQL intent lock
2022-07-25 16:05:00 【Leon_ Jinhai_ Sun】
An intent lock indicates that a transaction is locking a row or is about to lock a row , Show an intention . It is divided into intentional shared locks (IS) And intent exclusive lock (IX):
Before a transaction adds a shared lock to a row of a table , You must get a IS Lock or lock with higher priority .
A transaction adds an exclusive lock to a row of a table , It must get a IX lock .
Intention lock belongs to table lock , It doesn't work with innodb Row lock conflict in , There will be no conflict between any two intention locks , But it will be locked with the watch (S Lock and X lock ) Conflict , The following table :
Compatibility S lock X lock
IS lock compatible Conflict
IX lock Conflict Conflict
Table locks and row locks have ensured the isolation of transactions , Make sure the data is consistent , So why use intent lock ?
Intentional locking plays a role when a transaction is locked with a table . For example, a transaction wants to lock the table exclusively , If there is no intention to lock , Before locking, the transaction needs to judge whether each row of the current table has been locked , If the watch is big , It takes a lot of time to traverse each row for judgment . If intention lock is used , Then before locking the watch , Just judge whether the current table has intention lock , This speeds up the processing of table locks .
Intentional locks are maintained by the storage engine itself , Internal mechanism , The user cannot operate the intention lock .
边栏推荐
- Leetcode:154. find the minimum value II in the rotation sort array [about the middle and rear positioning dichotomy of the rotation sort array]
- MySQL 悲观锁
- Beyond Compare 4 实现class文件对比【最新】
- Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
- 食品安全丨无处不在的冷冻食品,你真的了解吗?
- Okaleido上线聚变Mining模式,OKA通证当下产出的唯一方式
- I interviewed 8 companies and got 5 offers in a week. Share my experience
- 百奥赛图与LiberoThera共同开发全人GPCR抗体药物取得里程碑式进展
- # JWT 图解
- Typescript learning 2 - Interface
猜你喜欢
![Beyond compare 4 realizes class file comparison [latest]](/img/ab/4babd7d4ee4ea132a6039858dd6451.png)
Beyond compare 4 realizes class file comparison [latest]

MATLAB optimization tool manopt installation

华为2023届提前批预热开始!左 神的程序代码面试指南终派上用场

Leetcode - 303 area and retrieval - array immutable (design prefix and array)
![[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage](/img/90/51d86111b918eb60761818110cdec4.jpg)
[server data recovery] data recovery cases of raid information loss caused by unexpected power failure of HP EVA server storage

Pytoch learning notes -- Summary of common functions 3

面试8家公司,1周拿了5个offer,分享一下自己的心得

【服务器数据恢复】HP EVA服务器存储意外断电导致RAID信息丢失的数据恢复案例

Matlab simulation of BPSK modulation system (1)

Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results
随机推荐
Leetcode - 303 area and retrieval - array immutable (design prefix and array)
Pytoch learning notes advanced_ CNN (using perception_module) implements MNIST dataset classification - (comments and results)
[Shakespeare: keep the fun of being a man]
一文入门Redis
BSC智能链合约模式系统开发详情
MySQL显式锁
# JWT 图解
Beyond compare 4 realizes class file comparison [latest]
MySQL教程71-WHERE 条件查询数据
泰山OFFICE技术讲座:英寸,厘米,磅,派卡,提,行,字行,像素的换算关系
Reasons for data format conversion when matlab reads the displayed image
"Digital security" alert NFT's seven Scams
MySQL tutorial 66 data table query statement
leetcode:528. 按权重随机选择【普通随机失效 + 要用前缀和二分】
乐观锁悲观锁适用场景
用GaussDB(for Redis)存画像,推荐业务轻松降本60%
mysql 表写锁
Product upgrade observation station in June
R语言偏相关性计算(Partial Correlation)、使用ggm包的pcor函数计算偏相关性(Partial Correlations)
Storage structure of cross linked list