当前位置:网站首页>[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
边栏推荐
- Problems encountered during commissioning of C # project
- Table access among Oracle database users
- C # related knowledge points
- 5xx series problem solving
- 2021-10-20
- A. Vacations (dp 贪心
- 关于oracle的函数。
- Real time lighting of websocket server based on esp32cam
- redis-4. Redis' message subscription, pipeline, transaction, modules, bloom filter, and cache LRU
- 在排序数组中查找元素的第一个和最后一个位置
猜你喜欢

Find the first and last positions of elements in a sorted array

Compare advantages and disadvantages of DFS and BFS and name vocabulary

Redis learning journey - persistence

Redis learning journey -- getting to know redis for the first time

Real time lighting of websocket server based on esp32cam

How app inventor accesses resource files in assets directory

redis-1. Install redis with pictures and texts

Learning notes of balanced binary tree -- one two pandas

Index push down (ICP) for mysql5.6

The password does not take effect after redis is set
随机推荐
Sharp weapon tcpdump
【splishsplash】重复输出splashsurf的脚本
平衡二叉树学习笔记------一二熊猫
[splashsplash] repeat the script that outputs splashsurf
China phosphate market in-depth analysis and investment prospect forecast report 2022-2028
Database outline
String source code analysis
C # Advanced Programming - Feature Section
C#合并多个richtextbox内容时始终存在换行符的解决方法
Logback log framework learning and problems
[vivefocus uses the wavevr plug-in to obtain handle operation events]
Functions about Oracle.
c#高級編程-特性篇
EF core execute SQL statement
[tools for quickly creating MySQL stand-alone and cluster test environments] dbdeployer
IDS persistence ---rdb
Distributed database tidb
Word document export
MySQL Gtid_ Executed and gtid_ Purged modification time
Station B crazy God notes