-v,输出详细信息
-d,调试
-s,是order的顺序
al 平均锁定时间
ar 平均返回记录时间
at 平均查询时间(默认)
c 计数
l 锁定时间
r 返回记录
t 查询时间
-r,反向排序,最大的在最后
-t,是top n的意思,即为返回前面多少条的数据
-a,不将所有的数字抽象为N,字符串抽象为S
-n,后面跟数字,在名称中至少有n个数字抽象为数字
-g,后边可以写一个正则匹配模式,大小写不敏感的
[mysql@ip131 slowlog]$ mysqldumpslow -s at -r -a -t 2 slow-query.log
Reading mysql slow query log from slow-query.log
Count: 5Time=11.59s (57s)Lock=0.00s (0s)Rows=0.0(0), root[root]@localhostinsertinto t2 select*from t6
Count: 1Time=19.07s (19s)Lock=0.00s (0s)Rows=0.0(0), root[root]@localhostinsertinto t6 select*from t2
文章目录常用选项输出项说明Usage: mysqldumpslow [ OPTS... ] [ LOGS... ]常用选项-v,输出详细信息 -d,调试-s,是order的顺序 al 平均锁定时间 ar 平均返回记录时间 at 平均查询时间(默认) c 计数 l 锁定时间 r 返回记录 t 查询时间-r,反向排序,最大的在最后-t,是top n的意思,即为返回前面多少条的数据-a,不将所有的数字抽象为N,字符串抽象为S-n,后面跟数字,在