1MYSQLDUMPSLOW(1) MariaDB Database System MYSQLDUMPSLOW(1)
2
3
4
6 mysqldumpslow - Summarize slow query log files
7
9 mysqldumpslow [options] [log_file ...]
10
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, aa: Sort by rows affected or average rows affected
70
71 · l, ae: Sort by rows examined or aggregate rows examined
72
73 · l, at: Sort by query time or average query time
74
75 · l, al: Sort by lock time or average lock time
76
77 · s, as: Sort by rows sent or average rows sent
78
79 · c: Sort by count
80
81 · -t N
82
83 Display only the first N queries in the output.
84
85 · --verbose, -v
86
87 Verbose mode. Print more information about what the program does.
88
89 Example of usage:
90
91 shell> mysqldumpslow
92 Reading mysql slow query log from /usr/local/mysql/data/mysqld51-apple-slow.log
93 Count: 1 Time=4.32s (4s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
94 insert into t2 select * from t1
95 Count: 3 Time=2.53s (7s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
96 insert into t2 select * from t1 limit N
97 Count: 3 Time=2.13s (6s) Lock=0.00s (0s) Rows=0.0 (0), root[root]@localhost
98 insert into t1 select * from t1
99
101 Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
102 2010-2015 MariaDB Foundation
103
104 This documentation is free software; you can redistribute it and/or
105 modify it only under the terms of the GNU General Public License as
106 published by the Free Software Foundation; version 2 of the License.
107
108 This documentation is distributed in the hope that it will be useful,
109 but WITHOUT ANY WARRANTY; without even the implied warranty of
110 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
111 General Public License for more details.
112
113 You should have received a copy of the GNU General Public License along
114 with the program; if not, write to the Free Software Foundation, Inc.,
115 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
116 http://www.gnu.org/licenses/.
117
118
120 For more information, please refer to the MariaDB Knowledge Base,
121 available online at https://mariadb.com/kb/
122
124 MariaDB Foundation (http://www.mariadb.org/).
125
126
127
128MariaDB 10.3 9 May 2017 MYSQLDUMPSLOW(1)