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

SEE ALSO

124       For more information, please refer to the MySQL Reference Manual, which
125       may already be installed locally and which is also available online at
126       http://dev.mysql.com/doc/.
127

AUTHOR

129       Oracle Corporation (http://dev.mysql.com/).
130
131
132
133MySQL 8.0                         03/06/2020                  MYSQLDUMPSLOW(1)
Impressum