查询慢SQL

 
可以查看当前时间访问库的所有请求SQL
SELECT COUNT(*) AS c,state,info  FROM `information_schema`.processlist GROUP BY state ORDER BY c DESC;
 
 
SHOW PROCESSLIST;
 
 
-- 查所有db库连接数
SELECT db,COUNT(db) FROM information_schema.`PROCESSLIST` GROUP BY db
 
 
mysql
posted @ 2017-08-18 18:22  Minily  阅读(112)  评论(0编辑  收藏  举报