mysql慢查詢日誌

一、開啓慢查詢日誌 1、查看是否開啓:show variables like 'slow_query_log'; 2、查看是否開啓記錄未使用索引的查詢:show variables like 'log_queries_not_using_indexes'; 3、開啓未使用索引的查詢日誌:set global log_queries_not_using_indexes=on; 4、查看超過多長時間的
相關文章
相關標籤/搜索