mysqldumpslow
mysqldumpslow [options] [filename]
Use this utility to display a summary of the slow query log. The name of the log file may be given in the second argument. Otherwise, the utility will look to the server’s configuration file (i.e., my.cnf or my.ini, depending on your system) for this information. The following options can narrow the summary or change what is displayed.
-aThis option instructs the utility not to combine queries with similar SQL statements.
--debug, -dThis option enables debugging mode.
-g
expressionThis option extracts information on queries that meet the given expression.
-h hostThis option specifies the host’s name for which the utility is to scan. By default, log files are named with the server’s hostname as the filename’s prefix.
--helpThis option displays help information on the utility.
-i hostThis option specifies the hostname of the server.
-lWith this option, the lock time is added to the execution time for the utility’s summary.
-n numberThis option sets the minimum number of occurrences for reporting.
-rThis option reverses the order of sorts for reporting.
-s typeThis option specifies the type of queries on which to
report. The choices are al for average lock
time, ar for average rows,
at for average execution time,
l for lock time, r for rows,
and t for execution time.
-tThis option sets the number of queries on which to display.
--verbose, -vThis option displays more information.