mysqldumpslow --help显示如下
Parse and summarize the MySQL slow query log. Options are
--verbose verbose
--debug debug
--help write this text to standard output
-v verbose
-d debug
-s ORDER what to sort by (al, at, ar, c, l, r, t), 'at' is default //排序
al: average lock time //平均锁定时间
ar: average rows sent //平均每次向客户端发送的行数
at: average query time //平均执行时间
c: count //执行次数
l: lock time //总共锁定时间
r: rows sent //总共发送的行数
t: query time //总共执行时间
-r reverse the sort order (largest last instead of first) //正序
-t NUM just show the top n queries //显示前多少个查询
-a don't abstract all numbers to N and strings to 'S'
-n NUM abstract numbers with at least n digits within names
-g PATTERN grep: only consider stmts that include this string //可以跟正则进行筛选
-h HOSTNAME hostname of db server for *-slow.log filename (can be wildcard),
default is '*', i.e. match all
-i NAME name of server instance (if using mysql.server startup script)
-l don't subtract lock time from total time