MySQL & MariaDB

How to Enable MySQL Slow Query Log (and Actually Use It)

If your site is slow and you’re not sure why, the MySQL slow query log is the first place to look. It records every query that takes longer than a set threshold — giving you the exact SQL statements that are dragging things down.