当前位置:网站首页>Concurrency control of performance tuning methodology
Concurrency control of performance tuning methodology
2022-07-05 21:58:00 【Short section senior】
Locks and transactions
lock
Business
Indivisibility (Atomicity)
Uniformity (Consistency)
Isolation, (Isolation)
persistence (Durability)
Concurrent
The transaction isolation
Uncommitted read
Read committed
Repeatable
serialize
Read commit snapshot
snapshot
Lock upgrade granularity
That's ok
page
Expand
Partition
surface
Suggestions for using transactions
The shorter the transaction duration, the better
Avoid interacting with users during transactions
During data query , Try not to enable transactions
Make use of transaction isolation level and lock prompt
Deadlock
Cyclic deadlock
conversion deadlock
Distributed deadlocks
Cause of lock and related treatment
Time consuming queries or transactions
Incorrect transaction or transaction isolation level
The transaction is not handled correctly
Undetected distributed deadlock
Locking data granularity is too high or too low
The basic principle of
Prevent locking others
Transactions should not cross batches , And the shorter the better , Don't interact with users during transactions
Handle the timeout carefully and give up , Or execution error
Build the right index , Data tables have clustered indexes
Try not to start implicit transactions , Avoid opening transactions for a long time
Try to reduce the transaction isolation level
If allowed , You can try using lock hints
Prevent and handle deadlocks
Try to avoid or deal with the blockage as soon as possible
Access data in the same order
Let different connections use the same lock
Provide different data access paths
The solution after the birth and death lock
Set up Deadlock priority , Let unimportant affairs give up automatically
Welcome to join me for wechat exchange and discussion ( Please note csdn Add )
边栏推荐
- AD637 usage notes
- Emotional analysis of wechat chat records on Valentine's day based on Text Mining
- Making global exception handling classes with aspect
- Recursive query of multi-level menu data
- R language learning notes
- 【愚公系列】2022年7月 Go教学课程 004-Go代码注释
- PyGame practical project: write Snake games with 300 lines of code
- 场景化面试:关于分布式锁的十问十答
- Alibaba cloud award winning experience: build a highly available system with polardb-x
- Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
猜你喜欢
2.2 basic grammar of R language
【愚公系列】2022年7月 Go教学课程 004-Go代码注释
MMAP learning
Incentive mechanism of Ethereum eth
Alibaba cloud award winning experience: build a highly available system with polardb-x
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
PIP install beatifulsoup4 installation failed
阿里云有奖体验:用PolarDB-X搭建一个高可用系统
Sorting out the problems encountered in MySQL built by pycharm connecting virtual machines
Yolov5 training custom data set (pycharm ultra detailed version)
随机推荐
SQL knowledge leak detection
Ethereum ETH的奖励机制
Drawing HSV color wheel with MATLAB
ICMP 介绍
微服務鏈路風險分析
POJ 3237 tree (tree chain splitting)
Countdown to 92 days, the strategy for the provincial preparation of the Blue Bridge Cup is coming~
Installation of VMware Workstation
Huawei cloud modelarts text classification - takeout comments
力扣------经营摩天轮的最大利润
Four components of logger
Parker driver maintenance COMPAX controller maintenance cpx0200h
ICMP introduction
Code bug correction, char is converted to int high-order symbol extension, resulting in changes in positivity and negativity and values. Int num = (int) (unsigned int) a, which will occur in older com
怎么利用Tensorflow2进行猫狗分类识别
SQL common syntax records
Gcc9.5 offline installation
MySQL连接断开报错MySQLdb._exceptions.OperationalError 4031, The client was disconnected by the server
Dbeaver executes multiple insert into error processing at the same time
Cold violence -- another perspective of objective function setting