当前位置:网站首页>Gbase 8s 并发控制之封锁粒度
Gbase 8s 并发控制之封锁粒度
2022-04-23 01:17:00 【八珍豆腐】
封锁粒度也成锁对象或者锁范围,表示封锁的作用范围,例如,一条记录上的锁只作用于该记录,一个关系上的锁作用于该关系中的所有记录。
可见,不同封锁粒度涉及封锁的数据量是不同的。
封锁对象的级别越高,涉及的数据量越大。封锁力度越大,如对整个数据库进行封锁,则将会对数据库中全部关系、记录进行封锁,系统处理单个事务的能力要强一些,系统开销相对小一些,但是,系统的并发度就会减小,处理并发事务的能力就会减弱。
反之,封锁粒度越小,如对单个表或记录进行封锁,系统的并发度就会高一些,系统开销也就会越大。
GBase 8s的锁机制可以锁定不同的粒度对象,在一个系统中同时存在不同大小的封锁单元供不同的事务选择使用是比较理想的。
综合来说,锁对象力度越高并发性越低,比如独占锁锁定数据库,则其他用户不能连接到该数据库。反之,如果独占一个表的某一行记录,则其他用户可以并行访问(读取、修改)其他记录,所以,在系统要求多用户高并发访问的情况下,应尽量采用低粒度的锁,如采用行级锁,如果系统要求较少并发,或者进行一些管理事务(数据库重建、表重建),则为了获得较高的性能,可以采用高粒度的锁。
版权声明
本文为[八珍豆腐]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_57486087/article/details/124347549
边栏推荐
- [HCTF 2018]admin
- Interface automation session authentication solution
- Lightly: a new generation of cloud IDE
- 京东一面:子线程如何获取父线程 ThreadLocal 的值?我蒙了。。。
- Detailed explanation of Milvus 2.0 quality assurance system
- Cai Guoqiang's fireworks NFT debut is as wonderful as fireworks during the day
- Tdengine deployment cluster installation
- 智能照明控制系统在医院的设计与应用
- 智能手表的下半场,机遇与挑战并存
- 200. Number of islands
猜你喜欢

Ampere computing releases the computing power of observation cloud "core" and jointly promotes the development of observability

京东一面:子线程如何获取父线程 ThreadLocal 的值?我蒙了。。。

Jijian cloud x servicego: help hardware manufacturers realize intelligent management of equipment repair and maintenance

Small example of gin - get request 2-handle handles post requests

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

How to introduce SPI into a project

Hardware SPI analysis and configuration process of imx6ull bare metal development

简单聊聊Ruby

Research and application of power monitoring system in sports training center

Activity preview | on April 23, a number of wonderful openmldb sharing came, which lived up to the good time of the weekend!
随机推荐
直播软件|IPTV直播软件|电视直播|TVPlayer-IPTV-EasyPlayer|友窝直播|超级直播软件定制开发
How to introduce SPI into a project
智能照明控制系统在医院的设计与应用
Why should I object to DBA's participation in business (issuing reports / changing data)
“自虐神器”一夜爆火:用手柄控制自己的脸,代码自取,后果自负
Xizhi technology Shen Yichen was selected as the "global youth leader" of the world economic forum in Davos in 2022
Elk setup (IV): monitor MySQL slow query and error log
Source code analysis of synchronousqueue
Common problems and solutions of crashsight access reporting
Application of safe electricity management platform in Jingbian Museum safe electricity management system
Learning of gin framework -- golang
德勤2022技术趋势:IT自我颠覆、技术跨界融合创新
Branch and loop statements
Hardware SPI analysis and configuration process of imx6ull bare metal development
Android本地数据库基础操作|多线程操作数据库|数据库的增删改查|批量插入数据库|线程池基础使用|玉念聿辉
What kind of project is suitable for automated testing?
Huawei CDN is fast everywhere
Error: permissionerror: [winerror 32] this file is in use by another program and cannot be accessed by the process. Solution of "+ file path"
"Open source summer" activity is hot. In the registration, rich bonuses are waiting for you to get!
Get in the car, the era of intelligent database autonomy has come, and Tencent cloud database x AI has made a new breakthrough