The Slow Query Log. If your server is above 516 you can set the slow query log in the runtime itself. Because of this it is considered best practice on production systems to disable the slow query log.

If your server is above 516 you can set the slow query log in the runtime itself. Enabling the Slow Query Log for MySQL or MariaDB can be a useful tool to diagnose performance and efficiency issues affecting your server. For which you have to execute this queries.
MySQL slow query log makes it easy to track SQL queries that take more than a specific time for execution.
Slow Query Log Overview. Show activity on this post. MySQL and MariaDB optionally log slow queries into the Slow Query Log or just Slow Log as friends call it. Slow query logs are disabled by default and can be enabled to assist with identifying performance bottlenecks during troubleshooting.