The Slow Query Log. The slow query log should only. This greatly simplifies the task of finding inefficient or time-consuming queries.
The slow query log feature in MySQL enables you to log queries that exceed a predefined time limit. Mysqldumpslow -a varlogmysql-slowlog. For which you have to execute this queries.
However in order to determine which queries require most urgent attention it is an advantage to summarize the slow query log.
By default the slow query log is disabled. This greatly simplifies the task of finding inefficient or time-consuming queries. Enabling the Slow Query Log for MySQL or MariaDB can be a useful tool to diagnose performance and efficiency issues affecting your server. The slow query log consists of SQL statements that take more than long_query_time seconds to execute and require at least min_examined_row_limit rows to be examined.