2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \"
2024-09-03 19:15:59 +02:00
.TH "\fBMARIADB-DUMPSLOW\fR" "1" "3 September 2024" "MariaDB 11.4" "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 *
. \" -----------------------------------------------------------------
2024-09-03 19:15:59 +02:00
. \" mariadb-dumpslow
2009-05-25 11:59:47 +02:00
.SH "NAME"
2024-09-03 19:15:59 +02:00
mariadb-dumpslow \- Summarize slow query log files (mariadb-dumpslow is now a symlink to mariadb-dumpslow)
2009-05-25 11:59:47 +02:00
.SH "SYNOPSIS"
2024-09-03 19:15:59 +02:00
.HP \w '\fBmariadb-dumpslow\ [\fR\fBoptions\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ \& .\&.\&.]\fR\ 'u
\fB mariadb-dumpslow [\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\& .
2024-09-03 19:15:59 +02:00
\fB mariadb-dumpslow\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,
2024-09-03 19:15:59 +02:00
\fB mariadb-dumpslow\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
MDEV-23789: Fix unnecessary acute accents in man pages
The man pages has several places where \' is intended to escape the single
quote and just print '. However, in reality this will print an ` (acute
accent). Fix this by removing excess backslashes. Also remove some excess
& in front of dots, such escaping is also unnecessary.
Also join several lines to avoid lone words in quotes to be read by groff
as macros when they are just text.
In a table (t{}) the content must be on new lines separately, so groff
will try to read them as macros too, so use \(aq that renders to '
(single quote).
This error was originally detected by Lintian:
https://lintian.debian.org/tags/acute-accent-in-manual-page
Example of man page sections before and after:
Make a backup of each table´s data file using the name tbl_name.OLD.
->
Make a backup of each table's data file using the name tbl_name.OLD.
A typical debug_options string is ´d:t:o,file_name´.
The default is ´d:t:o,/tmp/my_print_defaults.trace´.
->
A typical debug_options string is 'd:t:o,file_name'.
The default is 'd:t:o,/tmp/my_print_defaults.trace'.
shell> mysql --xml -uroot -e "SHOW VARIABLES LIKE ´version%´"
<?xml version="1.0"?>
<resultset statement="SHOW VARIABLES LIKE ´version%´" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
->
shell> mysql --xml -uroot -e "SHOW VARIABLES LIKE 'version%'"
<?xml version="1.0"?>
<resultset statement="SHOW VARIABLES LIKE 'version%'" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
This command was used to validate no man pages have syntax errors:
for x in *.?
do
echo "##### $x #####"
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $x >/dev/null
done
The man pages are not perfect after this, there are still a lot of
suboptimal syntax, but this helps towards better man pages.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2023-03-11 13:01:39 -08:00
these values to N and '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
2024-09-03 19:15:59 +02:00
\fB mariadb-dumpslow\fR
2009-05-25 11:59:47 +02:00
like this:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2024-09-03 19:15:59 +02:00
shell> \fB mariadb-dumpslow [\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
2024-09-03 19:15:59 +02:00
\fB mariadb-dumpslow\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
. \}
2024-09-03 19:15:59 +02:00
. \" mariadb-dumpslow: help option
. \" help option: mariadb-dumpslow
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
MDEV-23789: Fix unnecessary acute accents in man pages
The man pages has several places where \' is intended to escape the single
quote and just print '. However, in reality this will print an ` (acute
accent). Fix this by removing excess backslashes. Also remove some excess
& in front of dots, such escaping is also unnecessary.
Also join several lines to avoid lone words in quotes to be read by groff
as macros when they are just text.
In a table (t{}) the content must be on new lines separately, so groff
will try to read them as macros too, so use \(aq that renders to '
(single quote).
This error was originally detected by Lintian:
https://lintian.debian.org/tags/acute-accent-in-manual-page
Example of man page sections before and after:
Make a backup of each table´s data file using the name tbl_name.OLD.
->
Make a backup of each table's data file using the name tbl_name.OLD.
A typical debug_options string is ´d:t:o,file_name´.
The default is ´d:t:o,/tmp/my_print_defaults.trace´.
->
A typical debug_options string is 'd:t:o,file_name'.
The default is 'd:t:o,/tmp/my_print_defaults.trace'.
shell> mysql --xml -uroot -e "SHOW VARIABLES LIKE ´version%´"
<?xml version="1.0"?>
<resultset statement="SHOW VARIABLES LIKE ´version%´" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
->
shell> mysql --xml -uroot -e "SHOW VARIABLES LIKE 'version%'"
<?xml version="1.0"?>
<resultset statement="SHOW VARIABLES LIKE 'version%'" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
This command was used to validate no man pages have syntax errors:
for x in *.?
do
echo "##### $x #####"
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $x >/dev/null
done
The man pages are not perfect after this, there are still a lot of
suboptimal syntax, but this helps towards better man pages.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2023-03-11 13:01:39 -08:00
Do not abstract all numbers to N and strings to 'S'.
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
. \}
2024-09-03 19:15:59 +02:00
. \" mariadb-dumpslow: debug option
. \" debug option: mariadb-dumpslow
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
2024-09-03 19:15:59 +02:00
\fB mariadb\& .server\fR
2009-09-16 14:03:18 +02:00
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 09:44:53 +02: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
. \}
2024-09-03 19:15:59 +02:00
. \" mariadb-dumpslow: verbose option
. \" verbose option: mariadb-dumpslow
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
2024-09-03 19:15:59 +02:00
shell> \fB mariadb-dumpslow\fR
Reading mariadb slow query log from /usr/local/mysql/data/mysqld51\- apple\- slow\& .log
2009-09-16 14:03:18 +02:00
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
2024-09-03 19:15:59 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2024 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 21:29:06 +03: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/).