当前位置:网站首页>[MySQL] methods for troubleshooting lock related problems
[MySQL] methods for troubleshooting lock related problems
2022-06-13 07:37:00 【Fish is not fish】
Preface
Believe that whatever you do DBA Or development , In fact, no one wants to encounter the lock , Because the lock is a
Double-edged sword , If used well, it can protect the concurrent access competition to resources , But in bad words , It's easy to cause
Online problem , For example, deadlock. , Lock wait , Business waiting , Business is not available , The database performance drops dramatically .
MySQL Lock correlation table
I'm sure you all know that ,MySQL There are many kinds of locks , Read lock, write lock, metadata lock, etc .
To get to the point, how do we check locks , Generally, the following tables are used :5.7 edition Information_schema.innodb_locks The table shows the current waiting locks Information_schema.innodb_trx The table can query the currently uncommitted transactions
8.0 edition , Abandoned the previous innodb_locks surface Added the following tables stay performance_schema Here are a few tables : data_lock_waits. Displays the currently waiting locks data_locks. Display all current locks metadata_locks Display the details of the current metadata lock
MySQL Lock monitoring related
Innodb_row_lock_current_waits: Number of locks currently waiting Innodb_row_lock_time: It takes a total of time to wait for the lock from the start of the system to the present Innodb_row_lock_time_avg: The average time between system startup and lock waiting Innodb_row_lock_time_max: The longest time between system startup and lock waiting Innodb_row_lock_waits: Total number of lock waits since system startup
边栏推荐
- An example of CSRF attack defense in web application scenarios
- 平衡二叉树学习笔记------一二熊猫
- Consistency under distributed
- 理财产品连续几天收益都是零是怎么回事?
- P1434 [SHOI2002] 滑雪 (记忆化搜索
- mysql中时间字段 比较时间大小
- How app inventor accesses resource files in assets directory
- Redis learning journey -- getting to know redis for the first time
- 关于#etl#的问题:io.trino.jdbc.TrinoDriver
- EF CORE执行SQL语句
猜你喜欢

How idea breaks point debugging

Redis Cluster - the underlying principle of cluster execution commands

redis-1. Install redis with pictures and texts

Classification of databases

Redis' underlying data structure -- SDS

Upgrade the project of log4j to log4j2

11.29 Li Kou swipes questions every day

C language: how to give an alias to a global variable?
![[log framework] add user-defined parameters to the MDC implementation log](/img/94/5c0c51663f6a26d2ccf4a81047060f.jpg)
[log framework] add user-defined parameters to the MDC implementation log

powerdisgner逆向生成oracle数据模型
随机推荐
25个国内外文献数据库
Sorting of numbers and strings
Considerations for using redis transactions
P6154 游走(记忆化搜索
Table access among Oracle database users
[splashsplash] repeat the script that outputs splashsurf
Number of detection cycles "142857“
P6154 wandering (memory search
MySQL source code --table_ cache
First graphical interface (modified version)
Questions about ETL: io trino. jdbc. TrinoDriver
Que se passe - t - il si les produits financiers sont nuls pendant plusieurs jours?
Hashtable source code analysis
Redis underlying data structure -- listpack
JMeter encryption interface test
量化框架backtrader之一文读懂Analyzer分析器
Classification of databases
The password does not take effect after redis is set
[MySQL change master error] slave is not configured or failed to initialize properly
redis-4. Redis' message subscription, pipeline, transaction, modules, bloom filter, and cache LRU