1MYSQLDUMPSLOW(1)            MariaDB Database System           MYSQLDUMPSLOW(1)
2
3
4

NAME

6       mysqldumpslow - Summarize slow query log files
7

SYNOPSIS

9       mysqldumpslow [options] [log_file ...]
10

DESCRIPTION

12       The MariaDB slow query log contains information about queries that take
13       a long time to execute.  mysqldumpslow parses MariaDB slow query log
14       files and prints a summary of their contents.
15
16       Normally, mysqldumpslow groups queries that are similar except for the
17       particular values of number and string data values. It “abstracts”
18       these values to N and ´S´ when displaying summary output. The -a and -n
19       options can be used to modify value abstracting behavior.
20
21       Invoke mysqldumpslow like this:
22
23           shell> mysqldumpslow [options] [log_file ...]
24
25       mysqldumpslow supports the following options.
26
27       ·   --help
28
29           Display a help message and exit.
30
31       ·   -a
32
33           Do not abstract all numbers to N and strings to ´S´.
34
35       ·   --debug, -d
36
37           Run in debug mode.
38
39       ·   -g pattern
40
41           Consider only queries that match the (grep-style) pattern.
42
43       ·   -h host_name
44
45           Host name of MariaDB server for *-slow.log file name. The value can
46           contain a wildcard. The default is * (match all).
47
48       ·   -i name
49
50           Name of server instance (if using mysql.server startup script).
51
52       ·   -l
53
54           Do not subtract lock time from total time.
55
56       ·   -n N
57
58           Abstract numbers with at least N digits within names.
59
60       ·   -r
61
62           Reverse the sort order.
63
64       ·   -s sort_type
65
66           How to sort the output. The value of sort_type should be chosen
67           from the following list:
68
69           ·   t, at: Sort by query time or average query time
70
71           ·   l, al: Sort by lock time or average lock time
72
73           ·   s, as: Sort by rows sent or average rows sent
74
75           ·   c: Sort by count
76
77       ·   -t N
78
79           Display only the first N queries in the output.
80
81       ·   --verbose, -v
82
83           Verbose mode. Print more information about what the program does.
84
85       Example of usage:
86
87           shell> mysqldumpslow
88           Reading mysql slow query log from /usr/local/mysql/data/mysqld51-apple-slow.log
89           Count: 1  Time=4.32s (4s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
90            insert into t2 select * from t1
91           Count: 3  Time=2.53s (7s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
92            insert into t2 select * from t1 limit N
93           Count: 3  Time=2.13s (6s)  Lock=0.00s (0s)  Rows=0.0 (0), root[root]@localhost
94            insert into t1 select * from t1
95
97       Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
98       2010-2015 MariaDB Foundation
99
100       This documentation is free software; you can redistribute it and/or
101       modify it only under the terms of the GNU General Public License as
102       published by the Free Software Foundation; version 2 of the License.
103
104       This documentation is distributed in the hope that it will be useful,
105       but WITHOUT ANY WARRANTY; without even the implied warranty of
106       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
107       General Public License for more details.
108
109       You should have received a copy of the GNU General Public License along
110       with the program; if not, write to the Free Software Foundation, Inc.,
111       51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see
112       http://www.gnu.org/licenses/.
113
114

SEE ALSO

116       For more information, please refer to the MariaDB Knowledge Base,
117       available online at https://mariadb.com/kb/
118

AUTHOR

120       MariaDB Foundation (http://www.mariadb.org/).
121
122
123
124MariaDB 10.3                      9 May 2017                  MYSQLDUMPSLOW(1)
Impressum