当前位置:网站首页>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 .
边栏推荐
- openssl: error while loading shared libraries: libssl.so.1.1
- Multi-objective collaborative decision-making in supply chain
- SQL optimization scheme
- Go language configuration vscade
- What are the main reasons for server crash
- 28. Implement strstr() implement strstr()
- [Star Project] small hat aircraft War (III)
- UIToolkit中显示汉字
- buuReserve(4)
- Press in and pop-up sequence of "Niuke | daily question" stack
猜你喜欢

buuReserve(4)

Address resolution ARP Protocol

Leetcode question brushing 1: topic classification

7. Reverse Integer整数反转

【硬十宝典】——7.2【动态RAM】DDR4与DDR3区别解析

堆排序(heap-sort)

How does the national standard gb28181 protocol easygbs platform realize device video recording and set streaming IP?

Which "digital currencies" can survive this winter? 2020-03-30
![[fault diagnosis] bearing fault diagnosis based on Bayesian optimization support vector machine with matlab code](/img/9e/138e4b160fa9bd6486fac44a788d09.png)
[fault diagnosis] bearing fault diagnosis based on Bayesian optimization support vector machine with matlab code

TCP protocol -- message format, connection establishment, reliable transmission, congestion control
随机推荐
Problems related to the use of ucharts (components) in uniapp
docker修改挂载到宿主机上的mysql配置文件不生效?
[graduation season _ advanced technology Er] farewell to yourself who has been confused for the past two years. Regroup, junior I'm coming
Development stage of source code encryption technology
Resume considerations
怎样在win10家庭版中使用Hyper-V
从Architecture带你认识JVM
one hundred and twenty-three million one hundred and twenty-three thousand one hundred and twenty-three
Summarize and learn STM32 to create project template
Function of hot air pad
C # use log4net plug-in to output logs to files
服装行业如何实现数字化生产模式
"XXXX" is running, which may cause the system to jam, reduce the standby time, and click Close "
"Final review" 16/32-bit microprocessor (8086) basic register
CS5801_ HDMI to EDP advantage replaces lt6711a solution
『牛客|每日一题』模板栈
The results of the soft test can be checked, and the entry to query the results of the soft test has been opened in the first half of 2022
What to pay attention to when using German chicks for the first time
Uitoolkit tool template project
dev treelist 常用用法小结