mysql慢查询日志相关操作

查询是否打开mysql慢查询日志 show variables like ‘slow_query_log’; show variables like ‘%log%’; //查看是否记录无索引的sql //将没有索引的sql记录到日志表 set global log_queries_not_using_indexes =on; //查询多长时间的sql会记录日志 show variables lik
相关文章
相关标签/搜索