当前位置:网站首页>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 .
边栏推荐
- 「数字安全」警惕 NFT的七大骗局
- "Digital security" alert NFT's seven Scams
- 狂神redis笔记12
- 百奥赛图与LiberoThera共同开发全人GPCR抗体药物取得里程碑式进展
- 物理防火墙是什么?有什么作用?
- Is there only one lib under JDBC in Seata?
- TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format
- MySQL乐观锁
- 乐观锁悲观锁适用场景
- Visual studio 2022 view class diagram
猜你喜欢
![[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training](/img/d4/bcc577f320a893c7006177993b2e7a.png)
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training

Save the image with gaussdb (for redis), and the recommended business can easily reduce the cost by 60%

Visual studio 2022 view class diagram

Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results

狂神redis笔记12

Wavelet transform --dwt2 and wavedec2

Huawei 2023 starts to warm up in advance! Zuo Shen's program code interview guide comes in handy

Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output

Beyond Compare 4 实现class文件对比【最新】

Circulaindicator component, which makes the indicator style more diversified
随机推荐
Ice 100g network card fragment message hash problem
Redis分布式锁,没它真不行
Understand "average load"
R语言偏相关性计算(Partial Correlation)、使用ggm包的pcor函数计算偏相关性(Partial Correlations)
Leetcode:528. select randomly according to the weight [ordinary random failure + prefix and dichotomy]
报表工具的二次革命
基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现
ServletConfig 类和ServletContext 类
Reasons for data format conversion when matlab reads the displayed image
pymongo保存dataframe格式的数据(insert_one, insert_many, 多线程保存)
乐观锁悲观锁适用场景
leetcode:6127. 优质数对的数目【位运算找规律 + 两数之和大于等于k + 二分】
Matlab -- CVX optimization kit installation
MySQL tutorial 67- filter duplicate data using distinct
食品安全丨无处不在的冷冻食品,你真的了解吗?
Boomi荣获“多元化最佳首席执行官奖”和“职业成长最佳公司奖”,在大型公司类别中跻身50强
Typescript learning 2 - Interface
Data system partition design - partition rebalancing
Waterfall flow layout
Pytoch learning notes - Teacher Liu Er RNN advanced chapter - code comments and results