We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.slow_query_log 这个参数设置为ON,可以捕获执行时间超过一定数值的SQL语句。
2.long_query_time 当SQL语句执行时间超过此数值时,就会被记录到日志中,建议设置为1或者更短。
3.slow_query_log_file 记录日志的文件名。
4.log_queries_not_using_indexes 这个参数设置为ON,可以捕获到所有未使用索引的SQL语句,尽管这个SQL语句有可能执行得挺快。
mysql cpu 100% show processlist查看正在执行的语句是否索引失效导致全表扫描 slow_query_log_file中查看是否有慢查询
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1.slow_query_log
这个参数设置为ON,可以捕获执行时间超过一定数值的SQL语句。
2.long_query_time
当SQL语句执行时间超过此数值时,就会被记录到日志中,建议设置为1或者更短。
3.slow_query_log_file
记录日志的文件名。
4.log_queries_not_using_indexes
这个参数设置为ON,可以捕获到所有未使用索引的SQL语句,尽管这个SQL语句有可能执行得挺快。
mysql cpu 100%
show processlist查看正在执行的语句是否索引失效导致全表扫描
slow_query_log_file中查看是否有慢查询
The text was updated successfully, but these errors were encountered: