MySQL Slow Queries

Performance Schema

Percona Toolkit

pt-query-digest slow.log

pt-query-digest --processlist -h=myhost

pt-query-digest slow.log --report-histogram

Show slowest queries from slow.log

Show slowest queries from processlist on myhost

Show the distribution of query time in histogram form

Bibliography