# mariadb-dumpslow

{% hint style="info" %}
Previously, the client was called `mysqldumpslow`. It can still be accessed under this name, via a symlink in Linux, or an alternate binary in Windows.
{% endhint %}

`mariadb-dumpslow` is a tool to examine the [slow query log](/docs/server/server-management/server-monitoring-logs/slow-query-log.md).

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

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

## Options

#### `-a`

Don't abstract all numbers to N and strings to 'S'.

#### `-d`, `--debug`

Debug mode.

#### ` -g`` `` `*`pattern`*

Grep: only consider statements that include this string *pattern*.

#### `--help`

Display help.

#### ` -h`` `` `*`hostname`*

*Hostname* of db server for -slow\.log filename (can be a wildcard). The Default is `''`, that is, match all hosts.

#### ` -i`` `` `*`name`*

Name of server instance (if using mysql.server startup script).

#### `-l`

Don't subtract lock time from total time.

#### `-j`, `--json`

Stores the dumped data in JSON format. Available from MariaDB 12.1.

#### ` -n`` `` `*`number`*

Abstract numbers with at least this *number* of digits within names.

#### `-r`

Reverse the sort order (largest last instead of first).

#### ` -s`` `` `*`order`*

What to sort by (`aa`, `ae`, `al`, `ar`, `at`, `a`, `c`, `e`, `l`, `r`, `t`). The default is `at` . The meaning of the abbreviations is:

* `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`` `` `*`number`*

Just show the top *number of queries*.

#### `-v`, `--verbose`

Verbose mode.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/clients-and-utilities/logging-tools/mariadb-dumpslow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
