当前位置:网站首页>共享锁(Shared Lock)
共享锁(Shared Lock)
2022-07-25 15:43:00 【Leon_Jinhai_Sun】
共享锁(Shared Lock),又称S锁、读锁。针对行锁。
当有事务对数据加读锁后,其他事务只能对锁定的数据加读锁,不能加写锁(排他锁),所以其他事务只能读,不能写。
主要为了支持并发读的场景,读时不允许写操作。
加锁方式:
select * from T where id=1 lock in share mode;
释放方式:
commit、rollback;
边栏推荐
- 【莎士比亚:保持做人的乐趣】
- 一文入门Redis
- MySQL - user and permission control
- 对this对象的理解
- Gary marcus: learning a language is more difficult than you think
- 十字链表的存储结构
- MySQL教程65-MySQL操作表中数据
- 2019 Shaanxi Provincial race K-variant Dijstra
- Data system partition design - partition rebalancing
- Why is preparestatement better and safer?
猜你喜欢

Activity review | July 6 Anyuan AI X machine heart series lecture No. 2 | MIT professor Max tegmark shares "symbiotic evolution of human and AI"

ML - Speech - Introduction to speech processing

Gary marcus: learning a language is more difficult than you think

ML - Speech - traditional speech model

Gary Marcus: 学习语言比你想象的更难

LeetCode - 359 日志速率限制器 (设计)

Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network

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

Ice 100g network card fragment message hash problem

不愧是阿里内部“千亿级并发系统架构设计笔记”面面俱到,太全了
随机推荐
LeetCode - 641 设计循环双端队列(设计)*
CircleIndicator组件,使指示器风格更加多样化
"Digital security" alert NFT's seven Scams
Data system partition design - Request Routing
Leetcode - 380 o (1) time to insert, delete and get random elements (design hash table + array)
Implementation of recommendation system collaborative filtering in spark
BSC智能链合约模式系统开发详情
Data system partition design - partition rebalancing
不愧是阿里内部“千亿级并发系统架构设计笔记”面面俱到,太全了
Qtime definition (manual waste utilization is simple and beautiful)
Baseband simulation system experiment of 4pam in Gaussian channel and Rayleigh channel
JWT diagram
Gary marcus: learning a language is more difficult than you think
Pytoch learning notes advanced_ CNN (using perception_module) implements MNIST dataset classification - (comments and results)
CVPR 2022 | 网络中批处理归一化估计偏移的深入研究
【莎士比亚:保持做人的乐趣】
HDD杭州站·HarmonyOS技术专家分享HUAWEI DevEco Studio特色功能
[IJCAI 2022] parameter efficient large model sparse training method, which greatly reduces the resources required for sparse training
Why is preparestatement better and safer?
Leetcode - 303 area and retrieval - array immutable (design prefix and array)