Name
mysqldumpslow
Synopsis
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.
mysqldumpslow options
-aThis option instructs the utility not to combine queries with similar SQL statements.
--debug,-dThis option enables debugging mode.
-gexpressionThis option extracts information on queries that meet the given expression.
-hhostThis 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.
-ihostThis option specifies the hostname of the server.
-lWith this option, the lock time is added to the execution time for the utility’s summary.
-nnumberThis option sets the minimum number of occurrences for reporting.
-rThis option reverses the order of sorts for reporting.
-stypeThis option specifies the type of queries on which to report. The choices are
alfor average lock time,arfor average rows,atfor average execution time,lfor lock time,rfor rows, andtfor execution time.-tThis option sets the number of queries on which to display.
--verbose,-vThis option displays more information.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access