当前位置:网站首页>Gbase 8s 并发控制之封锁粒度
Gbase 8s 并发控制之封锁粒度
2022-04-23 01:17:00 【八珍豆腐】
封锁粒度也成锁对象或者锁范围,表示封锁的作用范围,例如,一条记录上的锁只作用于该记录,一个关系上的锁作用于该关系中的所有记录。
可见,不同封锁粒度涉及封锁的数据量是不同的。
封锁对象的级别越高,涉及的数据量越大。封锁力度越大,如对整个数据库进行封锁,则将会对数据库中全部关系、记录进行封锁,系统处理单个事务的能力要强一些,系统开销相对小一些,但是,系统的并发度就会减小,处理并发事务的能力就会减弱。
反之,封锁粒度越小,如对单个表或记录进行封锁,系统的并发度就会高一些,系统开销也就会越大。
GBase 8s的锁机制可以锁定不同的粒度对象,在一个系统中同时存在不同大小的封锁单元供不同的事务选择使用是比较理想的。
综合来说,锁对象力度越高并发性越低,比如独占锁锁定数据库,则其他用户不能连接到该数据库。反之,如果独占一个表的某一行记录,则其他用户可以并行访问(读取、修改)其他记录,所以,在系统要求多用户高并发访问的情况下,应尽量采用低粒度的锁,如采用行级锁,如果系统要求较少并发,或者进行一些管理事务(数据库重建、表重建),则为了获得较高的性能,可以采用高粒度的锁。
版权声明
本文为[八珍豆腐]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_57486087/article/details/124347549
边栏推荐
- IMX6ULL裸机开发之硬件SPI分析及配置过程
- 【蓝桥杯国赛真题18】Scratch加法选择题 青少年组 scratch蓝桥杯国赛真题和答案讲解
- Project manager's thinking mode worth trying: project success equation
- 京东一面:子线程如何获取父线程 ThreadLocal 的值?我蒙了。。。
- VRF in Mina
- What is October 24th? Why are there no senior programmers in China in their fifties and sixties, while foreigners,,, Yu Nianyu Hui take you to celebrate the 1024 programmer Festival
- 2022 penetration job interview (thinking)
- Frequently asked questions about recent BSN development
- IMX6ULL裸机开发之GPT通用定时器分析及配置过程
- From thinking to practice, digital transformation is the successful path of it operation
猜你喜欢

曦智科技沈亦晨入选2022达沃斯世界经济论坛“全球青年领袖”

Lightly: a new generation of cloud IDE

Generating class diagram with EA reverse engineering code

VS+C# 实现窗体输入框默认显示灰色文字

Originally, this is the correct posture for developers to open world book day!

Tdengine deployment cluster installation
![[actf2020 freshman competition]](/img/0c/4c06112383c0b225c987a499b622a9.png)
[actf2020 freshman competition]

“自虐神器”一夜爆火:用手柄控制自己的脸,代码自取,后果自负
Elk setup (IV): monitor MySQL slow query and error log

Im instant messaging development how to design a database that can support millions of concurrent users
随机推荐
How to become a real digital enterprise? Ruijie network releases the digital force awakening plan
GPT general timer analysis and configuration process of imx6ull bare metal development
直播软件|IPTV直播软件|电视直播|TVPlayer-IPTV-EasyPlayer|友窝直播|超级直播软件定制开发
Learning of gin framework -- golang
Thingskit Internet of things platform
[the first contact between Android engineers and smart home products ③] the specific implementation of smartconfig one key distribution network on the hardware side | the specific implementation of es
The complete form of smart home and the development of "small homekit"
Application of safe electricity management platform in Jingbian Museum safe electricity management system
Comp1011 programming solution
Research and application of Acrel-5000 building energy consumption monitoring system in Xixian Airport Garden Project
Project manager's thinking mode worth trying: project success equation
Cloud native Virtualization: building edge computing instances based on kubevirt
From thinking to practice, digital transformation is the successful path of it operation
IMX6ULL裸机开发之硬件SPI分析及配置过程
Research and application of power monitoring system for employee apartment building construction project
Tdengine deployment cluster installation
Innovative practice of short video content understanding and generation technology in meituan
DCB“一哥”先瑞达,靠什么拉升价值曲线?
Zhang Jian of Huawei cloud IOT expert group: he has become a senior engineer of Huawei since he was 22. The code is what I want to say to the world
Getting started with the go language is simple: the sortints method in sort