pt-query-digest command is a tool included in the Percona Toolkit project (formerly known as Maatkit). This command can read the queries from the slow query log, general query log, binary log (to be discussed later), and
SHOW PROCESSLIST statement.
pt-query-digest, Percona Toolkit needs to be installed. The package is included in several Linux distributions. The latest version can be downloaded from Percona's website as the
.rpm package. It is compatible with all versions of MariaDB and MySQL starting from MySQL 5.0. It does not work on Windows and requires Perl.
Usually, we prefer to analyze the slow query log first because the queries it contains are likely to be ...