Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Blocking Analysis of show full processlist in mysql

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you the blocking analysis of show full processlist in mysql. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

The execution result of show full processlist is as follows:

Most of the linked state is actually Sleep. This kind of link is actually idle, and there is not much value for viewing. What we want to observe is problematic, so we can filter it:

Filter out the MySQL threads with sleep status, and check the remaining MySQL threads with special state select id, db, user, host, command, time, state, info from information_schema.processlist where command! = 'Sleep' order by time desc\ G

Id-thread ID, you can kill a thread with: kill id;, very useful db-database

User-user

Host-IP of the host connecting the library

Command-currently executed commands, such as the most common: Sleep,Query,Connect, etc.

Time-time consumed, unit second, very useful state-execution status, such as Sending data,Sorting for group,Creating tmp table,Locked, etc., very useful, other states can see the reference article at the end of this article

Check innodb's transaction table INNODB_TRX to see if there is a transaction thread that is locking. If so, the transaction may block other threads SELECT * FROM information_schema.INNODB_TRX\ G. the above is the blocking analysis of show full processlist in mysql shared by Xiaobian. If you happen to have similar doubts, please refer to the above analysis for understanding. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report