~michaeleguo/ubuntu/trusty/percona-xtradb-cluster-5.5/arm64fix

« back to all changes in this revision

Viewing changes to man/mysqldumpslow.1

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-10 14:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20140210144423-f2134l2gxuvq2m6l
Tags: upstream-5.5.34-25.9+dfsg
ImportĀ upstreamĀ versionĀ 5.5.34-25.9+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: \fBmysqldumpslow\fR
 
3
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 
4
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
 
5
.\"      Date: 09/09/2013
 
6
.\"    Manual: MySQL Database System
 
7
.\"    Source: MySQL 5.5
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "\FBMYSQLDUMPSLOW\FR" "1" "09/09/2013" "MySQL 5\&.5" "MySQL Database System"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * Define some portability stuff
 
13
.\" -----------------------------------------------------------------
 
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
15
.\" http://bugs.debian.org/507673
 
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
 
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
18
.ie \n(.g .ds Aq \(aq
 
19
.el       .ds Aq '
 
20
.\" -----------------------------------------------------------------
 
21
.\" * set default formatting
 
22
.\" -----------------------------------------------------------------
 
23
.\" disable hyphenation
 
24
.nh
 
25
.\" disable justification (adjust text to left margin only)
 
26
.ad l
 
27
.\" -----------------------------------------------------------------
 
28
.\" * MAIN CONTENT STARTS HERE *
 
29
.\" -----------------------------------------------------------------
 
30
.\" mysqldumpslow
 
31
.SH "NAME"
 
32
mysqldumpslow \- Summarize slow query log files
 
33
.SH "SYNOPSIS"
 
34
.HP \w'\fBmysqldumpslow\ [\fR\fBoptions\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.]\fR\ 'u
 
35
\fBmysqldumpslow [\fR\fBoptions\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR
 
36
.SH "DESCRIPTION"
 
37
.PP
 
38
The MySQL slow query log contains information about queries that take a long time to execute (see
 
39
Section\ \&5.2.5, \(lqThe Slow Query Log\(rq)\&.
 
40
\fBmysqldumpslow\fR
 
41
parses MySQL slow query log files and prints a summary of their contents\&.
 
42
.PP
 
43
Normally,
 
44
\fBmysqldumpslow\fR
 
45
groups queries that are similar except for the particular values of number and string data values\&. It
 
46
\(lqabstracts\(rq
 
47
these values to
 
48
N
 
49
and
 
50
\*(AqS\*(Aq
 
51
when displaying summary output\&. The
 
52
\fB\-a\fR
 
53
and
 
54
\fB\-n\fR
 
55
options can be used to modify value abstracting behavior\&.
 
56
.PP
 
57
Invoke
 
58
\fBmysqldumpslow\fR
 
59
like this:
 
60
.sp
 
61
.if n \{\
 
62
.RS 4
 
63
.\}
 
64
.nf
 
65
shell> \fBmysqldumpslow [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR
 
66
.fi
 
67
.if n \{\
 
68
.RE
 
69
.\}
 
70
.PP
 
71
\fBmysqldumpslow\fR
 
72
supports the following options\&.
 
73
.sp
 
74
.RS 4
 
75
.ie n \{\
 
76
\h'-04'\(bu\h'+03'\c
 
77
.\}
 
78
.el \{\
 
79
.sp -1
 
80
.IP \(bu 2.3
 
81
.\}
 
82
.\" mysqldumpslow: help option
 
83
.\" help option: mysqldumpslow
 
84
\fB\-\-help\fR
 
85
.sp
 
86
Display a help message and exit\&.
 
87
.RE
 
88
.sp
 
89
.RS 4
 
90
.ie n \{\
 
91
\h'-04'\(bu\h'+03'\c
 
92
.\}
 
93
.el \{\
 
94
.sp -1
 
95
.IP \(bu 2.3
 
96
.\}
 
97
\fB\-a\fR
 
98
.sp
 
99
Do not abstract all numbers to
 
100
N
 
101
and strings to
 
102
\*(AqS\*(Aq\&.
 
103
.RE
 
104
.sp
 
105
.RS 4
 
106
.ie n \{\
 
107
\h'-04'\(bu\h'+03'\c
 
108
.\}
 
109
.el \{\
 
110
.sp -1
 
111
.IP \(bu 2.3
 
112
.\}
 
113
.\" mysqldumpslow: debug option
 
114
.\" debug option: mysqldumpslow
 
115
\fB\-\-debug\fR,
 
116
\fB\-d\fR
 
117
.sp
 
118
Run in debug mode\&.
 
119
.RE
 
120
.sp
 
121
.RS 4
 
122
.ie n \{\
 
123
\h'-04'\(bu\h'+03'\c
 
124
.\}
 
125
.el \{\
 
126
.sp -1
 
127
.IP \(bu 2.3
 
128
.\}
 
129
\fB\-g \fR\fB\fIpattern\fR\fR
 
130
.sp
 
131
Consider only queries that match the (\fBgrep\fR\-style) pattern\&.
 
132
.RE
 
133
.sp
 
134
.RS 4
 
135
.ie n \{\
 
136
\h'-04'\(bu\h'+03'\c
 
137
.\}
 
138
.el \{\
 
139
.sp -1
 
140
.IP \(bu 2.3
 
141
.\}
 
142
\fB\-h \fR\fB\fIhost_name\fR\fR
 
143
.sp
 
144
Host name of MySQL server for
 
145
*\-slow\&.log
 
146
file name\&. The value can contain a wildcard\&. The default is
 
147
*
 
148
(match all)\&.
 
149
.RE
 
150
.sp
 
151
.RS 4
 
152
.ie n \{\
 
153
\h'-04'\(bu\h'+03'\c
 
154
.\}
 
155
.el \{\
 
156
.sp -1
 
157
.IP \(bu 2.3
 
158
.\}
 
159
\fB\-i \fR\fB\fIname\fR\fR
 
160
.sp
 
161
Name of server instance (if using
 
162
\fBmysql\&.server\fR
 
163
startup script)\&.
 
164
.RE
 
165
.sp
 
166
.RS 4
 
167
.ie n \{\
 
168
\h'-04'\(bu\h'+03'\c
 
169
.\}
 
170
.el \{\
 
171
.sp -1
 
172
.IP \(bu 2.3
 
173
.\}
 
174
\fB\-l\fR
 
175
.sp
 
176
Do not subtract lock time from total time\&.
 
177
.RE
 
178
.sp
 
179
.RS 4
 
180
.ie n \{\
 
181
\h'-04'\(bu\h'+03'\c
 
182
.\}
 
183
.el \{\
 
184
.sp -1
 
185
.IP \(bu 2.3
 
186
.\}
 
187
\fB\-n \fR\fB\fIN\fR\fR
 
188
.sp
 
189
Abstract numbers with at least
 
190
\fIN\fR
 
191
digits within names\&.
 
192
.RE
 
193
.sp
 
194
.RS 4
 
195
.ie n \{\
 
196
\h'-04'\(bu\h'+03'\c
 
197
.\}
 
198
.el \{\
 
199
.sp -1
 
200
.IP \(bu 2.3
 
201
.\}
 
202
\fB\-r\fR
 
203
.sp
 
204
Reverse the sort order\&.
 
205
.RE
 
206
.sp
 
207
.RS 4
 
208
.ie n \{\
 
209
\h'-04'\(bu\h'+03'\c
 
210
.\}
 
211
.el \{\
 
212
.sp -1
 
213
.IP \(bu 2.3
 
214
.\}
 
215
\fB\-s \fR\fB\fIsort_type\fR\fR
 
216
.sp
 
217
How to sort the output\&. The value of
 
218
\fIsort_type\fR
 
219
should be chosen from the following list:
 
220
.sp
 
221
.RS 4
 
222
.ie n \{\
 
223
\h'-04'\(bu\h'+03'\c
 
224
.\}
 
225
.el \{\
 
226
.sp -1
 
227
.IP \(bu 2.3
 
228
.\}
 
229
t,
 
230
at: Sort by query time or average query time
 
231
.RE
 
232
.sp
 
233
.RS 4
 
234
.ie n \{\
 
235
\h'-04'\(bu\h'+03'\c
 
236
.\}
 
237
.el \{\
 
238
.sp -1
 
239
.IP \(bu 2.3
 
240
.\}
 
241
l,
 
242
al: Sort by lock time or average lock time
 
243
.RE
 
244
.sp
 
245
.RS 4
 
246
.ie n \{\
 
247
\h'-04'\(bu\h'+03'\c
 
248
.\}
 
249
.el \{\
 
250
.sp -1
 
251
.IP \(bu 2.3
 
252
.\}
 
253
r,
 
254
ar: Sort by rows sent or average rows sent
 
255
.RE
 
256
.sp
 
257
.RS 4
 
258
.ie n \{\
 
259
\h'-04'\(bu\h'+03'\c
 
260
.\}
 
261
.el \{\
 
262
.sp -1
 
263
.IP \(bu 2.3
 
264
.\}
 
265
c: Sort by count
 
266
.RE
 
267
.sp
 
268
By default,
 
269
\fBmysqldumpslow\fR
 
270
sorts by average query time (equivalent to
 
271
\fB\-s at\fR)\&.
 
272
.RE
 
273
.sp
 
274
.RS 4
 
275
.ie n \{\
 
276
\h'-04'\(bu\h'+03'\c
 
277
.\}
 
278
.el \{\
 
279
.sp -1
 
280
.IP \(bu 2.3
 
281
.\}
 
282
\fB\-t \fR\fB\fIN\fR\fR
 
283
.sp
 
284
Display only the first
 
285
\fIN\fR
 
286
queries in the output\&.
 
287
.RE
 
288
.sp
 
289
.RS 4
 
290
.ie n \{\
 
291
\h'-04'\(bu\h'+03'\c
 
292
.\}
 
293
.el \{\
 
294
.sp -1
 
295
.IP \(bu 2.3
 
296
.\}
 
297
.\" mysqldumpslow: verbose option
 
298
.\" verbose option: mysqldumpslow
 
299
\fB\-\-verbose\fR,
 
300
\fB\-v\fR
 
301
.sp
 
302
Verbose mode\&. Print more information about what the program does\&.
 
303
.RE
 
304
.PP
 
305
Example of usage:
 
306
.sp
 
307
.if n \{\
 
308
.RS 4
 
309
.\}
 
310
.nf
 
311
shell> \fBmysqldumpslow\fR
 
312
Reading mysql slow query log from /usr/local/mysql/data/mysqld51\-apple\-slow\&.log
 
313
Count: 1  Time=4\&.32s (4s)  Lock=0\&.00s (0s)  Rows=0\&.0 (0), root[root]@localhost
 
314
 insert into t2 select * from t1
 
315
Count: 3  Time=2\&.53s (7s)  Lock=0\&.00s (0s)  Rows=0\&.0 (0), root[root]@localhost
 
316
 insert into t2 select * from t1 limit N
 
317
Count: 3  Time=2\&.13s (6s)  Lock=0\&.00s (0s)  Rows=0\&.0 (0), root[root]@localhost
 
318
 insert into t1 select * from t1
 
319
.fi
 
320
.if n \{\
 
321
.RE
 
322
.\}
 
323
.SH "COPYRIGHT"
 
324
.br
 
325
.PP
 
326
Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved.
 
327
.PP
 
328
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
 
329
.PP
 
330
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
331
.PP
 
332
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
 
333
.sp
 
334
.SH "SEE ALSO"
 
335
For more information, please refer to the MySQL Reference Manual,
 
336
which may already be installed locally and which is also available
 
337
online at http://dev.mysql.com/doc/.
 
338
.SH AUTHOR
 
339
Oracle Corporation (http://dev.mysql.com/).