在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
统计最近N秒内的QPS值(包括每秒select,insert等值) mysql> select variable_name,sum(per_sec) as qps from (select straight_join lower(gs0.variable_name) as variable_name, (gs1.variable_value - gs0.variable_value)/5 as per_sec from ( select variable_name ,variable_value from information_schema.global_status where variable_name in ('com_select','com_update','com_insert','com_replace','com_delete') union all select '',sleep(5) from dual ) as gs0 join information_schema.global_status gs1 using (variable_name)) t group by variable_name with rollup; +---------------+---------+ 统计db启动以来的qps值,慢查询数量等信息 mysql> \s 以上这篇超简单的qps统计方法(推荐)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持极客世界。 |
请发表评论