当前位置:网站首页>意向锁(Intention Lock)
意向锁(Intention Lock)
2022-07-25 15:43:00 【Leon_Jinhai_Sun】
意向锁(Intention Lock),又称I锁。针对表锁。
当有事务给表的数据行加了共享锁或排他锁,同时会给表设置一个标识,代表已经有行锁了,其他事务要想对表加表锁时,就不必逐行判断有没有行锁可能跟表锁冲突了,直接读这个标识就可以确定自己该不该加表锁。特别是表中的记录很多时,逐行判断加表锁的方式效率很低。而这个标识就是意向锁。
- 意向共享锁,IS锁,对整个表加共享锁之前,需要先获取到意向共享锁。
- 意向排他锁,IX锁,对整个表加排他锁之前,需要先获取到意向排他锁。
主要是为了提高加表锁的效率。
加锁方式:
无法手动创建。
表级读锁:
lock table user_info read;
表级写锁:
lock table user_info write;
边栏推荐
- Storage structure of cross linked list
- JVM - classloader and parental delegation model
- 30 lines write the concurrency tool class yourself (semaphore, cyclicbarrier, countdownlatch)
- TypeError: Unrecognized value type: <class ‘str‘> ParserError: Unknown string format
- Dpdk packet receiving and sending problem case: non packet receiving problem location triggered by mismatched packet sending and receiving function
- BSC smart chain contract mode system development details
- 没错,请求DNS服务器还可以使用UDP协议
- The difference between mouseover and mouseenter
- Circulaindicator component, which makes the indicator style more diversified
- Baseband simulation system experiment of 4pam in Gaussian channel and Rayleigh channel
猜你喜欢

Okaleido上线聚变Mining模式,OKA通证当下产出的唯一方式

面试突击:为什么 TCP 需要 3 次握手?

Introduction to redis

Leetcode - 303 area and retrieval - array immutable (design prefix and array)

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

LeetCode - 622 设计循环队列 (设计)

Window system black window redis error 20creating server TCP listening socket *: 6379: listen: unknown error19-07-28

General test case writing specification

Recommended collection, which is probably the most comprehensive coding method summary of category type features

IDEA—点击文件代码与目录自动同步对应
随机推荐
没错,请求DNS服务器还可以使用UDP协议
BSC智能链合约模式系统开发详情
行云管家V6.5.1/2/3系列版本发布:数据库OpenAPI能力持续强化
Data system partition design - Request Routing
活动回顾|7月6日安远AI x 机器之心系列讲座第2期|麻省理工教授Max Tegmark分享「人类与AI的共生演化 」
Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
【IJCAI 2022】参数高效的大模型稀疏训练方法,大幅减少稀疏训练所需资源
组件化和模块化
Alibaba's internal "100 billion level concurrent system architecture design notes" are all inclusive, too comprehensive
微信小程序
R语言使用gt包和gtExtras包漂亮地显示表格数据:gt_bar_plot函数和gt_plt_bar_pct函数可视化百分比条形图、原始数据的百分比条形、缩放后的数据的百分比条形、指定数据对齐宽度
HDD Hangzhou station · harmonyos technical experts share the features of Huawei deveco studio
LeetCode - 622 设计循环队列 (设计)
Wechat applet
How matlab produces random complex sequences
MySQL教程68-AS 设置别名
不愧是阿里内部“千亿级并发系统架构设计笔记”面面俱到,太全了
"Digital security" alert NFT's seven Scams
R语言偏相关性计算(Partial Correlation)、使用ggm包的pcor函数计算偏相关性(Partial Correlations)
The second revolution of reporting tools