For the past few months, I've been using MySQL with some issues on a client's server. I had installed MySQL, MariaDB and Percona SQL Server with the same data.
After a few days I looked at the slow query logs, and I saw that the file size is around 300MB. Analyzing the file could have taken a very long time but the Percona Toolkit helped. The toolkit can work with MySQL, MariaDB or Percona SQL Server. There are a lot of commands in it, but I only have one to parse the slow query and report the results.
The slow query log is approximately 300 MB in size. It would take a lot of effort to scroll through and find out what happened and analyze all the records. Here's how Percona Toolkit has helped tremendously :
percona-toolkit's 'pt-query-digest' command takes the slow query log and generates a summary which is more or less similar to mysql.
pt-query-digest / var / log / mysql / slow_query_log
This contains the file and produces a report that is in line with the ADDM report we get in Oracle.
Below is a summary of the 300MB raw file analysis:
It all comes down to 6 queries that require our attention. Furthermore, among the six, the optimization of the first two of them benefited an improvement of almost 90%.
I only used this single command out of necessity, despite being very powerful and robust, browse the other commands given in the link Thu