Append to configuration (my.cnf) under [mysqld]
slow_query_log = on
long_query_time = 2
SET GLOBAL slow_query_log = on;
SET GLOBAL long_query_time = 2
With this current setup, we filtered all queries from our application running more than 2 seconds. This is a good way to identify slow queries and optimise them.
However, there are also queries from the MySQL Enterprise monitor that were also being logged. In this case, i found out a (2) graph metrics checking every minute for the total backup time (total_time) and total lock time [Read more...]