当前位置:网站首页>MySQL intent lock
MySQL intent lock
2022-07-26 06:52: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 .
边栏推荐
- "Niuke | daily question" inverse Polish expression
- [image denoising] image denoising based on bicube interpolation and sparse representation matlab source code
- 「“xxxx“正在运行,可能导致系统卡顿,降低待机时间,点按关闭」处理
- Is there any online account opening process of Huatai Securities? Is online account opening safe
- MySQL table write lock
- 【Star项目】小帽飞机大战(二)
- "Harmonyos" explore harmonyos applications
- "Niuke | daily question" template stack
- [graduation season _ advanced technology Er] farewell to yourself who has been confused for the past two years. Regroup, junior I'm coming
- SQL optimization scheme
猜你喜欢

UIToolkit中显示汉字

"Harmonyos" explore harmonyos applications

Valid bracket sequence of "Niuke | daily question"

『牛客|每日一题』有效括号序列

Do you think you are a reliable test / development programmer? "Back to the pot"? Surface and reality

怎样在win10家庭版中使用Hyper-V

C # use log4net plug-in to output logs to files

『牛客|每日一题』逆波兰表达式

Why the server is stuck

微信小程序 - 从入门到入土
随机推荐
Rust language - slice type (&[u8])
归并排序(merge_sort)
曲线曲率展示
MySQL isolation level transactions
Leetcode question brushing 1: topic classification
[hardware ten treasures] - 7.1 [dynamic RAM] key points of DDR hardware design
【毕业季_进击的技术er】送别过去两年迷茫的自己。重整旗鼓,大三我来啦
在第一次使用德国小鸡要注意的地方
Rust语言- Slice(切片)类型(&[u8])
"XXXX" is running, which may cause the system to jam, reduce the standby time, and click Close "
Force buckle - 4. Find the median of two positive arrays
Resume considerations
The creation of "harmonyos" project and the use of virtual machines
Function of hot air pad
[Web3 series development tutorial - create your first NFT (4)] what can NFTs bring to you
【Star项目】小帽飞机大战(四)
Delete ^m from VIM
7. Reverse Integer整数反转
Ruby on rails Code Execution Vulnerability (cve-2020-8163) technical analysis, research, judgment and protection
UIToolkit中显示汉字