OS Manuals

/usr/bin/mysqldumpslow

The MySQL open source relational database

From mysql-8.4 8.4.13-r3 (enterprise-packages), captured 2026-11-08 by running mysqldumpslow --help (exit 0). permalink

Usage: mysqldumpslow [ OPTS... ] [ LOGS... ]

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
Options (14)
OptionDescriptionSource
--verboseverbosehelp
--debugdebughelp
--helpwrite this text to standard outputhelp
-vverbosehelp
-ddebughelp
-s ORDERwhat 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 timehelp
-rreverse the sort order (largest last instead of first)help
-t NUMjust show the top n querieshelp
-adon't abstract all numbers to N and strings to 'S'help
-n NUMabstract numbers with at least n digits within nameshelp
-g PATTERNgrep: only consider stmts that include this stringhelp
-h HOSTNAMEhostname of db server for *-slow.log filename (can be wildcard), default is '*', i.e. match allhelp
-i NAMEname of server instance (if using mysql.server startup script)help
-ldon't subtract lock time from total timehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.