執行show variables LIKE "%quer%";
slow_query_log:是否開啓慢日誌
slow_query_log_file:慢日誌文件路徑,默認文件是
long_query_time:設置超時多少秒寫入日誌,單位秒
log_queries_not_using_indexes:是否開啓沒使用到所有的查詢,前提必須是slow_query_log=ON
如何配置:
快速修改在mysql中執行:
set global slow_query_log=on;
set global slow_query_log_file ='日誌文件路徑'
set global log_queries_not_using_indexes=on;
MYSQL配置my.ini或my.cnf中修改