1) 现场抓出慢查询语句 show full processlist;
2) 配置参数:
slow_query_log_file = ON 慢查询开启开关
long_query_time =2 记录大于2秒的sql语句
log_queries_not_using_indexes = ON 没有使用索引的sql语句
slow_query_log_file = /application/mysql-5.6.34/data/db01-slow.log 慢log文件
min_examined_row_limit =