This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-22. For the latest, interactive version please visit https://mariadb.com/kb/.

mariadb-dumpslow

mariadb-dumpslow is a tool to examine the slow query log.

Prior to MariaDB 10.5, the client was called mysqldumpslow. It can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.

It parses the slow query log files, printing a summary result. Normally, mariadb-dumpslow groups queries that are similar except for the particular values of number and string data values. It “abstracts” these values to N and ´S´ when displaying summary output. The -a and -n options can be used to modify value abstracting behavior.

Usage

mariadb-dumpslow [ options... ] [ logs... ]

Options

OptionDescription
-aDon't abstract all numbers to N and strings to 'S'
-d, --debugDebug
-g PATTERNGrep: only consider statements that include this string
--helpDisplay help
-h HOSTNAMEHostname of db server for *-slow.log filename (can be wildcard), default is '*', i.e. match all
-i NAMEName of server instance (if using mysql.server startup script)
-lDon't subtract lock time from total time
-n NUMAbstract numbers with at least NUM digits within names
-rReverse the sort order (largest last instead of first)
-s ORDERWhat to sort by (aa, ae, al, ar, at, a, c, e, l, r, t). at is default.
aa average rows affected
ae aggregated number of rows examined
al average lock time
ar average rows sent
at average query time
a rows affected
c count
e rows examined
l lock time
r rows sent
t query time
-t NUMJust show the top NUM queries.
-v, --verboseVerbose mode.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.