.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PT-INDEX-USAGE 1p" .TH PT-INDEX-USAGE 1p "2020-08-30" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" pt\-index\-usage \- Read queries from a log and analyze how they use indexes. .SH "SYNOPSIS" .IX Header "SYNOPSIS" Usage: pt-index-usage [\s-1OPTIONS\s0] [\s-1FILES\s0] .PP pt-index-usage reads queries from logs and analyzes how they use indexes. .PP Analyze queries in slow.log and print reports: .PP .Vb 1 \& pt\-index\-usage /path/to/slow.log \-\-host localhost .Ve .PP Disable reports and save results to percona database for later analysis: .PP .Vb 1 \& pt\-index\-usage slow.log \-\-no\-report \-\-save\-results\-database percona .Ve .SH "RISKS" .IX Header "RISKS" Percona Toolkit is mature, proven in the real world, and well tested, but all database tools can pose a risk to the system and the database server. Before using this tool, please: .IP "\(bu" 4 Read the tool's documentation .IP "\(bu" 4 Review the tool's known \*(L"\s-1BUGS\*(R"\s0 .IP "\(bu" 4 Test the tool on a non-production server .IP "\(bu" 4 Backup your production server and verify the backups .SH "DESCRIPTION" .IX Header "DESCRIPTION" This tool connects to a MySQL database server, reads through a query log, and uses \s-1EXPLAIN\s0 to ask MySQL how it will use each query. When it is finished, it prints out a report on indexes that the queries didn't use. .PP The query log needs to be in MySQL's slow query log format. If you need to input a different format, you can use pt-query-digest to translate the formats. If you don't specify a filename, the tool reads from \s-1STDIN.\s0 .PP The tool runs two stages. In the first stage, the tool takes inventory of all the tables and indexes in your database, so it can compare the existing indexes to those that were actually used by the queries in the log. In the second stage, it runs \s-1EXPLAIN\s0 on each query in the query log. It uses separate database connections to inventory the tables and run \s-1EXPLAIN,\s0 so it opens two connections to the database. .PP If a query is not a \s-1SELECT,\s0 it tries to transform it to a roughly equivalent \&\s-1SELECT\s0 query so it can be EXPLAINed. This is not a perfect process, but it is good enough to be useful. .PP The tool skips the \s-1EXPLAIN\s0 step for queries that are exact duplicates of those seen before. It assumes that the same query will generate the same \s-1EXPLAIN\s0 plan as it did previously (usually a safe assumption, and generally good for performance), and simply increments the count of times that the indexes were used. However, queries that have the same fingerprint but different checksums will be re-EXPLAINed. Queries that have different literal constants can have different execution plans, and this is important to measure. .PP After EXPLAIN-ing the query, it is necessary to try to map aliases in the query back to the original table names. For example, consider the \s-1EXPLAIN\s0 plan for the following query: .PP .Vb 1 \& SELECT * FROM tbl1 AS foo; .Ve .PP The \s-1EXPLAIN\s0 output will show access to table \f(CW\*(C`foo\*(C'\fR, and that must be translated back to \f(CW\*(C`tbl1\*(C'\fR. This process involves complex parsing. It is generally very accurate, but there is some chance that it might not work right. If you find cases where it fails, submit a bug report and a reproducible test case. .PP Queries that cannot be EXPLAINed will cause all subsequent queries with the same fingerprint to be blacklisted. This is to reduce the work they cause, and prevent them from continuing to print error messages. However, at least in this stage of the tool's development, it is my opinion that it's not a good idea to preemptively silence these, or prevent them from being EXPLAINed at all. I am looking for lots of feedback on how to improve things like the query parsing. So please submit your test cases based on the errors the tool prints! .SH "OUTPUT" .IX Header "OUTPUT" After it reads all the events in the log, the tool prints out \s-1DROP\s0 statements for every index that was not used. It skips indexes for tables that were never accessed by any queries in the log, to avoid false-positive results. .PP If you don't specify \*(L"\-\-quiet\*(R", the tool also outputs warnings about statements that cannot be EXPLAINed and similar. These go to standard error. .PP Progress reports are enabled by default (see \*(L"\-\-progress\*(R"). These also go to standard error. .SH "OPTIONS" .IX Header "OPTIONS" This tool accepts additional command-line arguments. Refer to the \&\*(L"\s-1SYNOPSIS\*(R"\s0 and usage information for details. .IP "\-\-ask\-pass" 4 .IX Item "--ask-pass" Prompt for a password when connecting to MySQL. .IP "\-\-charset" 4 .IX Item "--charset" short form: \-A; type: string .Sp Default character set. If the value is utf8, sets Perl's binmode on \&\s-1STDOUT\s0 to utf8, passes the mysql_enable_utf8 option to DBD::mysql, and runs \s-1SET NAMES UTF8\s0 after connecting to MySQL. Any other value sets binmode on \s-1STDOUT\s0 without the utf8 layer, and runs \s-1SET NAMES\s0 after connecting to MySQL. .IP "\-\-config" 4 .IX Item "--config" type: Array .Sp Read this comma-separated list of config files; if specified, this must be the first option on the command line. .IP "\-\-create\-save\-results\-database" 4 .IX Item "--create-save-results-database" Create the \*(L"\-\-save\-results\-database\*(R" if it does not exist. .Sp If the \*(L"\-\-save\-results\-database\*(R" already exists and this option is specified, the database is used and the necessary tables are created if they do not already exist. .IP "\-\-[no]create\-views" 4 .IX Item "--[no]create-views" Create views for \*(L"\-\-save\-results\-database\*(R" example queries. .Sp Several example queries are given for querying the tables in the \&\*(L"\-\-save\-results\-database\*(R". These example queries are, by default, created as views. Specifying \f(CW\*(C`\-\-no\-create\-views\*(C'\fR prevents these views from being created. .IP "\-\-database" 4 .IX Item "--database" short form: \-D; type: string .Sp The database to use for the connection. .IP "\-\-databases" 4 .IX Item "--databases" short form: \-d; type: hash .Sp Only get tables and indexes from this comma-separated list of databases. .IP "\-\-databases\-regex" 4 .IX Item "--databases-regex" type: string .Sp Only get tables and indexes from database whose names match this Perl regex. .IP "\-\-defaults\-file" 4 .IX Item "--defaults-file" short form: \-F; type: string .Sp Only read mysql options from the given file. You must give an absolute pathname. .IP "\-\-drop" 4 .IX Item "--drop" type: Hash; default: non-unique .Sp Suggest dropping only these types of unused indexes. .Sp By default pt-index-usage will only suggest to drop unused secondary indexes, not primary or unique indexes. You can specify which types of unused indexes the tool suggests to drop: primary, unique, non-unique, all. .Sp A separate \f(CW\*(C`ALTER TABLE\*(C'\fR statement for each type is printed. So if you specify \f(CW\*(C`\-\-drop all\*(C'\fR and there is a primary key and a non-unique index, the \f(CW\*(C`ALTER TABLE ... DROP\*(C'\fR for each will be printed on separate lines. .IP "\-\-empty\-save\-results\-tables" 4 .IX Item "--empty-save-results-tables" Drop and re-create all pre-existing tables in the \*(L"\-\-save\-results\-database\*(R". This allows information from previous runs to be removed before the current run. .IP "\-\-help" 4 .IX Item "--help" Show help and exit. .IP "\-\-host" 4 .IX Item "--host" short form: \-h; type: string .Sp Connect to host. .IP "\-\-ignore\-databases" 4 .IX Item "--ignore-databases" type: Hash .Sp Ignore this comma-separated list of databases. .IP "\-\-ignore\-databases\-regex" 4 .IX Item "--ignore-databases-regex" type: string .Sp Ignore databases whose names match this Perl regex. .IP "\-\-ignore\-tables" 4 .IX Item "--ignore-tables" type: Hash .Sp Ignore this comma-separated list of table names. .Sp Table names may be qualified with the database name. .IP "\-\-ignore\-tables\-regex" 4 .IX Item "--ignore-tables-regex" type: string .Sp Ignore tables whose names match the Perl regex. .IP "\-\-password" 4 .IX Item "--password" short form: \-p; type: string .Sp Password to use when connecting. If password contains commas they must be escaped with a backslash: \*(L"exam\e,ple\*(R" .IP "\-\-port" 4 .IX Item "--port" short form: \-P; type: int .Sp Port number to use for connection. .IP "\-\-progress" 4 .IX Item "--progress" type: array; default: time,30 .Sp Print progress reports to \s-1STDERR.\s0 The value is a comma-separated list with two parts. The first part can be percentage, time, or iterations; the second part specifies how often an update should be printed, in percentage, seconds, or number of iterations. .IP "\-\-quiet" 4 .IX Item "--quiet" short form: \-q .Sp Do not print any warnings. Also disables \*(L"\-\-progress\*(R". .IP "\-\-[no]report" 4 .IX Item "--[no]report" default: yes .Sp Print the reports for \*(L"\-\-report\-format\*(R". .Sp You may want to disable the reports by specifying \f(CW\*(C`\-\-no\-report\*(C'\fR if, for example, you also specify \*(L"\-\-save\-results\-database\*(R" and you only want to query the results tables later. .IP "\-\-report\-format" 4 .IX Item "--report-format" type: Array; default: drop_unused_indexes .Sp Right now there is only one report: drop_unused_indexes. This report prints \&\s-1SQL\s0 statements for dropping any unused indexes. See also \*(L"\-\-drop\*(R". .Sp See also \*(L"\-\-[no]report\*(R". .IP "\-\-save\-results\-database" 4 .IX Item "--save-results-database" type: \s-1DSN\s0 .Sp Save results to tables in this database. Information about indexes, queries, tables and their usage is stored in several tables in the specified database. The tables are auto-created if they do not exist. If the database doesn't exist, it can be auto-created with \*(L"\-\-create\-save\-results\-database\*(R". In this case the connection is initially created with no default database, then after the database is created, it is \s-1USE\s0'ed. .Sp pt-index-usage executes \s-1INSERT\s0 statements to save the results. Therefore, you should be careful if you use this feature on a production server. It might increase load, or cause trouble if you don't want the server to be written to, or so on. .Sp This is a new feature. It may change in future releases. .Sp After a run, you can query the usage tables to answer various questions about index usage. The tables have the following \s-1CREATE TABLE\s0 definitions: .Sp MAGIC_create_indexes: .Sp .Vb 7 \& CREATE TABLE IF NOT EXISTS indexes ( \& db VARCHAR(64) NOT NULL, \& tbl VARCHAR(64) NOT NULL, \& idx VARCHAR(64) NOT NULL, \& cnt BIGINT UNSIGNED NOT NULL DEFAULT 0, \& PRIMARY KEY (db, tbl, idx) \& ) .Ve .Sp MAGIC_create_queries: .Sp .Vb 6 \& CREATE TABLE IF NOT EXISTS queries ( \& query_id BIGINT UNSIGNED NOT NULL, \& fingerprint TEXT NOT NULL, \& sample TEXT NOT NULL, \& PRIMARY KEY (query_id) \& ) .Ve .Sp MAGIC_create_tables: .Sp .Vb 6 \& CREATE TABLE IF NOT EXISTS tables ( \& db VARCHAR(64) NOT NULL, \& tbl VARCHAR(64) NOT NULL, \& cnt BIGINT UNSIGNED NOT NULL DEFAULT 0, \& PRIMARY KEY (db, tbl) \& ) .Ve .Sp MAGIC_create_index_usage: .Sp .Vb 8 \& CREATE TABLE IF NOT EXISTS index_usage ( \& query_id BIGINT UNSIGNED NOT NULL, \& db VARCHAR(64) NOT NULL, \& tbl VARCHAR(64) NOT NULL, \& idx VARCHAR(64) NOT NULL, \& cnt BIGINT UNSIGNED NOT NULL DEFAULT 1, \& UNIQUE INDEX (query_id, db, tbl, idx) \& ) .Ve .Sp MAGIC_create_index_alternatives: .Sp .Vb 11 \& CREATE TABLE IF NOT EXISTS index_alternatives ( \& query_id BIGINT UNSIGNED NOT NULL, \-\- This query used \& db VARCHAR(64) NOT NULL, \-\- this index, but... \& tbl VARCHAR(64) NOT NULL, \-\- \& idx VARCHAR(64) NOT NULL, \-\- \& alt_idx VARCHAR(64) NOT NULL, \-\- was an alternative \& cnt BIGINT UNSIGNED NOT NULL DEFAULT 1, \& UNIQUE INDEX (query_id, db, tbl, idx, alt_idx), \& INDEX (db, tbl, idx), \& INDEX (db, tbl, alt_idx) \& ) .Ve .Sp The following are some queries you can run against these tables to answer common questions you might have. Each query is also created as a view (with MySQL v5.0 and newer) if \f(CW"\-\-[no]create\-views"\fR is true (it is by default). The view names are the strings after the \f(CW\*(C`MAGIC_view_\*(C'\fR prefix. .Sp Question: which queries sometimes use different indexes, and what fraction of the time is each index chosen? MAGIC_view_query_uses_several_indexes: .Sp .Vb 10 \& SELECT iu.query_id, CONCAT_WS(\*(Aq.\*(Aq, iu.db, iu.tbl, iu.idx) AS idx, \& variations, iu.cnt, iu.cnt / total_cnt * 100 AS pct \& FROM index_usage AS iu \& INNER JOIN ( \& SELECT query_id, db, tbl, SUM(cnt) AS total_cnt, \& COUNT(*) AS variations \& FROM index_usage \& GROUP BY query_id, db, tbl \& HAVING COUNT(*) > 1 \& ) AS qv USING(query_id, db, tbl); .Ve .Sp Question: which indexes have lots of alternatives, i.e. are chosen instead of other indexes, and for what queries? MAGIC_view_index_has_alternates: .Sp .Vb 6 \& SELECT CONCAT_WS(\*(Aq.\*(Aq, db, tbl, idx) AS idx_chosen, \& GROUP_CONCAT(DISTINCT alt_idx) AS alternatives, \& GROUP_CONCAT(DISTINCT query_id) AS queries, SUM(cnt) AS cnt \& FROM index_alternatives \& GROUP BY db, tbl, idx \& HAVING COUNT(*) > 1; .Ve .Sp Question: which indexes are considered as alternates for other indexes, and for what queries? MAGIC_view_index_alternates: .Sp .Vb 6 \& SELECT CONCAT_WS(\*(Aq.\*(Aq, db, tbl, alt_idx) AS idx_considered, \& GROUP_CONCAT(DISTINCT idx) AS alternative_to, \& GROUP_CONCAT(DISTINCT query_id) AS queries, SUM(cnt) AS cnt \& FROM index_alternatives \& GROUP BY db, tbl, alt_idx \& HAVING COUNT(*) > 1; .Ve .Sp Question: which of those are never chosen by any queries, and are therefore superfluous? MAGIC_view_unused_index_alternates: .Sp .Vb 12 \& SELECT CONCAT_WS(\*(Aq.\*(Aq, i.db, i.tbl, i.idx) AS idx, \& alt.alternative_to, alt.queries, alt.cnt \& FROM indexes AS i \& INNER JOIN ( \& SELECT db, tbl, alt_idx, GROUP_CONCAT(DISTINCT idx) AS alternative_to, \& GROUP_CONCAT(DISTINCT query_id) AS queries, SUM(cnt) AS cnt \& FROM index_alternatives \& GROUP BY db, tbl, alt_idx \& HAVING COUNT(*) > 1 \& ) AS alt ON i.db = alt.db AND i.tbl = alt.tbl \& AND i.idx = alt.alt_idx \& WHERE i.cnt = 0; .Ve .Sp Question: given a table, which indexes were used, by how many queries, with how many distinct fingerprints? Were there alternatives? Which indexes were not used? You can edit the following query's \s-1SELECT\s0 list to also see the query IDs in question. MAGIC_view_index_usage: .Sp .Vb 10 \& SELECT i.idx, iu.usage_cnt, iu.usage_total, \& ia.alt_cnt, ia.alt_total \& FROM indexes AS i \& LEFT OUTER JOIN ( \& SELECT db, tbl, idx, COUNT(*) AS usage_cnt, \& SUM(cnt) AS usage_total, GROUP_CONCAT(query_id) AS used_by \& FROM index_usage \& GROUP BY db, tbl, idx \& ) AS iu ON i.db=iu.db AND i.tbl=iu.tbl AND i.idx = iu.idx \& LEFT OUTER JOIN ( \& SELECT db, tbl, idx, COUNT(*) AS alt_cnt, \& SUM(cnt) AS alt_total, \& GROUP_CONCAT(query_id) AS alt_queries \& FROM index_alternatives \& GROUP BY db, tbl, idx \& ) AS ia ON i.db=ia.db AND i.tbl=ia.tbl AND i.idx = ia.idx; .Ve .Sp Question: which indexes on a given table are vital for at least one query (there is no alternative)? MAGIC_view_required_indexes: .Sp .Vb 10 \& SELECT i.db, i.tbl, i.idx, no_alt.queries \& FROM indexes AS i \& INNER JOIN ( \& SELECT iu.db, iu.tbl, iu.idx, \& GROUP_CONCAT(iu.query_id) AS queries \& FROM index_usage AS iu \& LEFT OUTER JOIN index_alternatives AS ia \& USING(db, tbl, idx) \& WHERE ia.db IS NULL \& GROUP BY iu.db, iu.tbl, iu.idx \& ) AS no_alt ON no_alt.db = i.db AND no_alt.tbl = i.tbl \& AND no_alt.idx = i.idx \& ORDER BY i.db, i.tbl, i.idx, no_alt.queries; .Ve .IP "\-\-set\-vars" 4 .IX Item "--set-vars" type: Array .Sp Set the MySQL variables in this comma-separated list of \f(CW\*(C`variable=value\*(C'\fR pairs. .Sp By default, the tool sets: .Sp .Vb 1 \& wait_timeout=10000 .Ve .Sp Variables specified on the command line override these defaults. For example, specifying \f(CW\*(C`\-\-set\-vars wait_timeout=500\*(C'\fR overrides the defaultvalue of \f(CW10000\fR. .Sp The tool prints a warning and continues if a variable cannot be set. .IP "\-\-socket" 4 .IX Item "--socket" short form: \-S; type: string .Sp Socket file to use for connection. .IP "\-\-tables" 4 .IX Item "--tables" short form: \-t; type: hash .Sp Only get indexes from this comma-separated list of tables. .IP "\-\-tables\-regex" 4 .IX Item "--tables-regex" type: string .Sp Only get indexes from tables whose names match this Perl regex. .IP "\-\-user" 4 .IX Item "--user" short form: \-u; type: string .Sp User for login if not current user. .IP "\-\-version" 4 .IX Item "--version" Show version and exit. .IP "\-\-[no]version\-check" 4 .IX Item "--[no]version-check" default: yes .Sp Check for the latest version of Percona Toolkit, MySQL, and other programs. .Sp This is a standard \*(L"check for updates automatically\*(R" feature, with two additional features. First, the tool checks its own version and also the versions of the following software: operating system, Percona Monitoring and Management (\s-1PMM\s0), MySQL, Perl, MySQL driver for Perl (DBD::mysql), and Percona Toolkit. Second, it checks for and warns about versions with known problems. For example, MySQL 5.5.25 had a critical bug and was re-released as 5.5.25a. .Sp A secure connection to Percona’s Version Check database server is done to perform these checks. Each request is logged by the server, including software version numbers and unique \s-1ID\s0 of the checked system. The \s-1ID\s0 is generated by the Percona Toolkit installation script or when the Version Check database call is done for the first time. .Sp Any updates or known problems are printed to \s-1STDOUT\s0 before the tool's normal output. This feature should never interfere with the normal operation of the tool. .Sp For more information, visit . .SH "DSN OPTIONS" .IX Header "DSN OPTIONS" These \s-1DSN\s0 options are used to create a \s-1DSN.\s0 Each option is given like \&\f(CW\*(C`option=value\*(C'\fR. The options are case-sensitive, so P and p are not the same option. There cannot be whitespace before or after the \f(CW\*(C`=\*(C'\fR and if the value contains whitespace it must be quoted. \s-1DSN\s0 options are comma-separated. See the percona-toolkit manpage for full details. .IP "\(bu" 4 A .Sp dsn: charset; copy: yes .Sp Default character set. .IP "\(bu" 4 D .Sp dsn: database; copy: yes .Sp Database to connect to. .IP "\(bu" 4 F .Sp dsn: mysql_read_default_file; copy: yes .Sp Only read default options from the given file .IP "\(bu" 4 h .Sp dsn: host; copy: yes .Sp Connect to host. .IP "\(bu" 4 p .Sp dsn: password; copy: yes .Sp Password to use when connecting. If password contains commas they must be escaped with a backslash: \*(L"exam\e,ple\*(R" .IP "\(bu" 4 P .Sp dsn: port; copy: yes .Sp Port number to use for connection. .IP "\(bu" 4 S .Sp dsn: mysql_socket; copy: yes .Sp Socket file to use for connection. .IP "\(bu" 4 u .Sp dsn: user; copy: yes .Sp User for login if not current user. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" The environment variable \f(CW\*(C`PTDEBUG\*(C'\fR enables verbose debugging output to \s-1STDERR.\s0 To enable debugging and capture all output to a file, run the tool like: .PP .Vb 1 \& PTDEBUG=1 pt\-index\-usage ... > FILE 2>&1 .Ve .PP Be careful: debugging output is voluminous and can generate several megabytes of output. .SH "SYSTEM REQUIREMENTS" .IX Header "SYSTEM REQUIREMENTS" You need Perl, \s-1DBI,\s0 DBD::mysql, and some core packages that ought to be installed in any reasonably new version of Perl. .SH "BUGS" .IX Header "BUGS" For a list of known bugs, see . .PP Please report bugs at . Include the following information in your bug report: .IP "\(bu" 4 Complete command-line used to run the tool .IP "\(bu" 4 Tool \*(L"\-\-version\*(R" .IP "\(bu" 4 MySQL version of all servers involved .IP "\(bu" 4 Output from the tool including \s-1STDERR\s0 .IP "\(bu" 4 Input files (log/dump/config files, etc.) .PP If possible, include debugging output by running the tool with \f(CW\*(C`PTDEBUG\*(C'\fR; see \*(L"\s-1ENVIRONMENT\*(R"\s0. .SH "DOWNLOADING" .IX Header "DOWNLOADING" Visit to download the latest release of Percona Toolkit. Or, get the latest release from the command line: .PP .Vb 1 \& wget percona.com/get/percona\-toolkit.tar.gz \& \& wget percona.com/get/percona\-toolkit.rpm \& \& wget percona.com/get/percona\-toolkit.deb .Ve .PP You can also get individual tools from the latest release: .PP .Vb 1 \& wget percona.com/get/TOOL .Ve .PP Replace \f(CW\*(C`TOOL\*(C'\fR with the name of any tool. .SH "AUTHORS" .IX Header "AUTHORS" Baron Schwartz and Daniel Nichter .SH "ABOUT PERCONA TOOLKIT" .IX Header "ABOUT PERCONA TOOLKIT" This tool is part of Percona Toolkit, a collection of advanced command-line tools for MySQL developed by Percona. Percona Toolkit was forked from two projects in June, 2011: Maatkit and Aspersa. Those projects were created by Baron Schwartz and primarily developed by him and Daniel Nichter. Visit to learn about other free, open-source software from Percona. .SH "COPYRIGHT, LICENSE, AND WARRANTY" .IX Header "COPYRIGHT, LICENSE, AND WARRANTY" This program is copyright 2011\-2018 Percona \s-1LLC\s0 and/or its affiliates, 2010\-2011 Baron Schwartz. .PP \&\s-1THIS PROGRAM IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0 .PP This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation, version 2; \s-1OR\s0 the Perl Artistic License. On \s-1UNIX\s0 and similar systems, you can issue `man perlgpl' or `man perlartistic' to read these licenses. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA.\s0 .SH "VERSION" .IX Header "VERSION" pt-index-usage 3.2.1 .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 7532:" 4 .IX Item "Around line 7532:" Non-ASCII character seen before =encoding in 'Percona’s'. Assuming \s-1UTF\-8\s0