show full processlist;
show open tables where In_use > 0;
show processlist;
select * from information_schema.processlist where db = '数据库名称' and command != 'Sleep' and Time >1000
SQL性能诊断技巧
本文介绍了一种使用SQL语句进行数据库性能诊断的方法,通过展示如何查看活动进程、打开的表和长时间运行的查询,帮助读者理解和解决数据库性能瓶颈。
show full processlist;
show open tables where In_use > 0;
show processlist;
select * from information_schema.processlist where db = '数据库名称' and command != 'Sleep' and Time >1000
1189
1081
5285

被折叠的 条评论
为什么被折叠?