当前位置:网站首页>[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
边栏推荐
- Sorting of numbers and strings
- Adding certificates to different systems
- EF CORE执行SQL语句
- Redis master-slave replication - mentality detection mechanism
- Redis Cluster - the underlying principle of slot assignment
- Redis master-slave replication - the underlying principle of partial resynchronization
- Relevant knowledge under WinForm
- How to solve the 404 problem
- P6154 wandering (memory search
- Redis master-slave replication - underlying principle
猜你喜欢

Three handshakes and four waves of TCP protocol and why------ One two pandas

11.29 Li Kou swipes questions every day

Redis underlying data structure ----quicklist

平衡二叉树学习笔记------一二熊猫

RT thread simulator lvgl control: button button event

Oracle problem: the data in the field is separated by commas. Take the data on both sides of the comma

AQS - detailed explanation of reentrantlock source code

socket编程2:IO复用(select && poll && epoll)

Mui mixed development - when updating the download app, the system status bar displays the download progress

Redis learning journey - cache exceptions (CACHE penetration, cache avalanche, cache breakdown)
随机推荐
B. I Hate 1111 (记忆化搜索 数论
理財產品連續幾天收益都是零是怎麼回事?
量化框架backtrader之一文讀懂Analyzer分析器
C language: how to give an alias to a global variable?
论文笔记: 多标签学习 BP-MLL
Questions about ETL: io trino. jdbc. TrinoDriver
TCP协议的三次握手过程和四次挥手过程以及为什么要这样? ------一二熊猫
Oracle problem: the data in the field is separated by commas. Take the data on both sides of the comma
GCC compilation process, function library related compilation process
I always don't understand the high address and high position
Socket programming 2:io reuse (select & poll & epoll)
Compare advantages and disadvantages of DFS and BFS and name vocabulary
Database outline
Personal JS learning notes
Adding certificates to different systems
redis-0. Introduction to redis and NiO principle (random talk)
10. process communication
redis-1. Install redis with pictures and texts
String source code analysis
nodejs文件模块fs