2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \"
2019-07-01 17:21:57 +02:00
.TH "\FBMYSQLDUMPSLOW\FR" "1" "27 June 2019" "MariaDB 10\&.5" "MariaDB Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" mysqldumpslow
2009-05-25 11:59:47 +02:00
.SH "NAME"
mysqldumpslow \- Summarize slow query log files
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBmysqldumpslow\ [\fR\fBoptions\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ \& .\&.\&.]\fR\ 'u
\fB mysqldumpslow [\fR \fB options\fR \fB ] [\fR \fB \fI log_file\fR \fR \fB \& .\& .\& .]\fR
2009-05-25 11:59:47 +02:00
.SH "DESCRIPTION"
.PP
2015-09-09 14:32:52 +02:00
The MariaDB slow query log contains information about queries that take a long time to execute\& .
2009-05-25 11:59:47 +02:00
\fB mysqldumpslow\fR
2015-09-09 14:32:52 +02:00
parses MariaDB slow query log files and prints a summary of their contents\& .
2009-05-25 11:59:47 +02:00
.PP
Normally,
\fB mysqldumpslow\fR
2009-09-16 14:03:18 +02:00
groups queries that are similar except for the particular values of number and string data values\& . It
2009-05-25 11:59:47 +02:00
\(lq abstracts\(rq
these values to
N
and
2009-09-16 14:03:18 +02:00
\' S\'
when displaying summary output\& . The
2009-05-25 11:59:47 +02:00
\fB \- a\fR
and
\fB \- n\fR
2009-09-16 14:03:18 +02:00
options can be used to modify value abstracting behavior\& .
2009-05-25 11:59:47 +02:00
.PP
Invoke
\fB mysqldumpslow\fR
like this:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB mysqldumpslow [\fR \fB \fI options\fR \fR \fB ] [\fR \fB \fI log_file\fR \fR \fB \& .\& .\& .]\fR
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
\fB mysqldumpslow\fR
2010-04-28 15:06:11 +02:00
supports the following options\& .
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqldumpslow: help option
. \" help option: mysqldumpslow
2009-05-25 11:59:47 +02:00
\fB \- \- help\fR
.sp
2009-09-16 14:03:18 +02:00
Display a help message and exit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- a\fR
.sp
Do not abstract all numbers to
N
and strings to
2009-09-16 14:03:18 +02:00
\' S\' \& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqldumpslow: debug option
. \" debug option: mysqldumpslow
2009-05-25 11:59:47 +02:00
\fB \- \- debug\fR ,
\fB \- d\fR
.sp
2009-09-16 14:03:18 +02:00
Run in debug mode\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- g \fR \fB \fI pattern\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Consider only queries that match the (\fB grep\fR \- style) pattern\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- h \fR \fB \fI host_name\fR \fR
.sp
2015-09-09 14:32:52 +02:00
Host name of MariaDB server for
2009-09-16 14:03:18 +02:00
*\- slow\& .log
2015-09-09 14:32:52 +02:00
file name\& . The value can contain a wildcard\& . The default is
2009-05-25 11:59:47 +02:00
*
2009-09-16 14:03:18 +02:00
(match all)\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- i \fR \fB \fI name\fR \fR
.sp
Name of server instance (if using
2009-09-16 14:03:18 +02:00
\fB mysql\& .server\fR
startup script)\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- l\fR
.sp
2009-09-16 14:03:18 +02:00
Do not subtract lock time from total time\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- n \fR \fB \fI N\fR \fR
.sp
Abstract numbers with at least
\fI N\fR
2009-09-16 14:03:18 +02:00
digits within names\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- r\fR
.sp
2009-09-16 14:03:18 +02:00
Reverse the sort order\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- s \fR \fB \fI sort_type\fR \fR
.sp
2009-09-16 14:03:18 +02:00
How to sort the output\& . The value of
2009-05-25 11:59:47 +02:00
\fI sort_type\fR
should be chosen from the following list:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
t,
2019-03-15 08:44:53 +01:00
aa: Sort by rows affected or average rows affected
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
l,
ae: Sort by rows examined or aggregate rows examined
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
l,
2009-05-25 11:59:47 +02:00
at: Sort by query time or average query time
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
l,
al: Sort by lock time or average lock time
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
s,
2009-09-16 14:03:18 +02:00
as: Sort by rows sent or average rows sent
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
c: Sort by count
.RE
2009-09-16 14:03:18 +02:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2009-05-25 11:59:47 +02:00
\fB \- t \fR \fB \fI N\fR \fR
.sp
Display only the first
\fI N\fR
2009-09-16 14:03:18 +02:00
queries in the output\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysqldumpslow: verbose option
. \" verbose option: mysqldumpslow
2009-05-25 11:59:47 +02:00
\fB \- \- verbose\fR ,
\fB \- v\fR
.sp
2009-09-16 14:03:18 +02:00
Verbose mode\& . Print more information about what the program does\& .
2009-05-25 11:59:47 +02:00
.RE
.PP
Example of usage:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
shell> \fB mysqldumpslow\fR
2009-09-16 14:03:18 +02:00
Reading mysql slow query log from /usr/local/mysql/data/mysqld51\- apple\- slow\& .log
Count: 1 Time=4\& .32s (4s) Lock=0\& .00s (0s) Rows=0\& .0 (0), root[root]@localhost
2009-05-25 11:59:47 +02:00
insert into t2 select * from t1
2009-09-16 14:03:18 +02:00
Count: 3 Time=2\& .53s (7s) Lock=0\& .00s (0s) Rows=0\& .0 (0), root[root]@localhost
2009-05-25 11:59:47 +02:00
insert into t2 select * from t1 limit N
2009-09-16 14:03:18 +02:00
Count: 3 Time=2\& .13s (6s) Lock=0\& .00s (0s) Rows=0\& .0 (0), root[root]@localhost
2009-05-25 11:59:47 +02:00
insert into t1 select * from t1
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2019-07-01 17:21:57 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2019 MariaDB Foundation
2009-05-25 11:59:47 +02:00
.PP
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.
.PP
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.
.PP
2019-05-11 20:29:06 +02:00
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-1335 USA or see http://www.gnu.org/licenses/.
2009-09-16 14:03:18 +02:00
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
2015-09-09 14:32:52 +02:00
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
2009-05-25 11:59:47 +02:00
.SH AUTHOR
2015-09-09 14:32:52 +02:00
MariaDB Foundation (http://www.mariadb.org/).