mysql 慢查询

show variables like 'slow_query_log'

set global slow_query_log_file='/var/log/slow.log'

set global log_queries_not_using_indexes=on

set global long_query_time=1

原文地址:https://www.cnblogs.com/agang-php/p/5479866.html