1:查看系统cpu使用情况,在shell 中输入top 1, 找到mysql 的pid。

2:2:Shell中输入pidstat -t -p <mysqld_pid> 1,1是每隔一秒监控一次,倒数第三列是cpu百分比, 找到正数第四列的TID,

MySQL 5.7 CPU高的定位方法

 

 

3:MySQL中输入select * from performance_schema.threads where thread_os_id=<TID>,找到相关的sql脚本。

MySQL 5.7 CPU高的定位方法

 

相关文章:

  • 2021-10-27
  • 2021-08-03
  • 2021-12-03
  • 2022-12-23
  • 2021-11-04
  • 2021-11-21
  • 2021-05-12
猜你喜欢
  • 2021-04-17
  • 2021-05-17
  • 2021-11-01
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案