MySQL 中有內建的設定, 在 my.cnf 中設定:log-slow-queries = [slow_query_log_filename]即可記錄查詢時間花費超過的 10s的 SQL ...
blog.longwin.com.tw