当前位置:网站首页>Gbase 8s 并发控制之封锁粒度
Gbase 8s 并发控制之封锁粒度
2022-04-23 01:17:00 【八珍豆腐】
封锁粒度也成锁对象或者锁范围,表示封锁的作用范围,例如,一条记录上的锁只作用于该记录,一个关系上的锁作用于该关系中的所有记录。
可见,不同封锁粒度涉及封锁的数据量是不同的。
封锁对象的级别越高,涉及的数据量越大。封锁力度越大,如对整个数据库进行封锁,则将会对数据库中全部关系、记录进行封锁,系统处理单个事务的能力要强一些,系统开销相对小一些,但是,系统的并发度就会减小,处理并发事务的能力就会减弱。
反之,封锁粒度越小,如对单个表或记录进行封锁,系统的并发度就会高一些,系统开销也就会越大。
GBase 8s的锁机制可以锁定不同的粒度对象,在一个系统中同时存在不同大小的封锁单元供不同的事务选择使用是比较理想的。
综合来说,锁对象力度越高并发性越低,比如独占锁锁定数据库,则其他用户不能连接到该数据库。反之,如果独占一个表的某一行记录,则其他用户可以并行访问(读取、修改)其他记录,所以,在系统要求多用户高并发访问的情况下,应尽量采用低粒度的锁,如采用行级锁,如果系统要求较少并发,或者进行一些管理事务(数据库重建、表重建),则为了获得较高的性能,可以采用高粒度的锁。
版权声明
本文为[八珍豆腐]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_57486087/article/details/124347549
边栏推荐
- Hardware IIC analysis and configuration process of imx6ull bare metal development
- Comp1011 programming solution
- Get rid of the "small workshop" of AI production: how to build a cloud native AI platform based on kubernetes
- 再谈被动安全 教你看懂中保研碰撞测试的评级报告
- DCB“一哥”先瑞达,靠什么拉升价值曲线?
- Chapter 9 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of exercises for users to establish their own data types
- [Ethernet switching security] - switch flow control / DHCP snooping / IP source guard
- 【Android工程师与智能家居产品的第一次接触③】SmartConfig一键配网在硬件端的具体实现|ESP8266一键配网在Arduino的具体实现|玉念聿辉
- Cai Guoqiang's fireworks NFT debut is as wonderful as fireworks during the day
- Research and application of Acrel-5000 building energy consumption monitoring system in Xixian Airport Garden Project
猜你喜欢

体育训练中心项目电力监控系统的研究与应用

IMX6ULL裸机开发之GPT通用定时器分析及配置过程

Practice and exploration of knowledge map visualization technology in meituan

How to become a real digital enterprise? Ruijie network releases the digital force awakening plan

What kind of project is suitable for automated testing?

为企业出海“搭桥”,汇量科技靠什么出圈?

DCB "first brother" xianruida, what does it rely on to raise the value curve?

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

Design and application of intelligent lighting control system in hospital

Processus d'analyse et de configuration du matériel IIC pour le développement de la machine nue imx6ull
随机推荐
简单聊聊Ruby
Android development interview questions collection and sorting (including answers), [work perception]
The origin explanation and use example of image pre training model
Small example of gin - get request 2-handle handles post requests
Use Charles to grab app package
How to become a real digital enterprise? Ruijie network releases the digital force awakening plan
Application of safe electricity management platform in Jingbian Museum safe electricity management system
Interview eight part essay (disorderly order, no classification)
VS+C# 实现窗体输入框默认显示灰色文字
"Open source summer" activity is hot. In the registration, rich bonuses are waiting for you to get!
Function encapsulation such as addition, deletion, modification and query of linked list (summary)
C language guessing game and trickery game
【以太网交换安全】--- 交换机流量控制/DHCP Snooping/IP Source Guard
移動端京東商城
Lightly: a new generation of go IDE
换个姿势看 hooks,灵感来源组合和 HOC 模式下逻辑视图分离新创意
Elk setup (IV): monitor MySQL slow query and error log
Research and application of Acrel-5000 building energy consumption monitoring system in Xixian Airport Garden Project
Branch and loop statements
再谈被动安全 教你看懂中保研碰撞测试的评级报告