Home  >  Article  >  Database  >  MySQL Slow Query设置_MySQL

MySQL Slow Query设置_MySQL

WBOY
WBOYOriginal
2016-06-01 13:40:341135browse

bitsCN.com
MySQL Slow Query设置 在my.cnf文件中查找slow
 [plain]#log_slow_queries = /var/log/mysql/mysql-slow.log  去掉注释, 保存到日志文件路径根据需要修改。 同时去掉下面的设置的注释:   [plain] long_query_time = 1  log-queries-not-using-indexes   这里当超过1秒的查询就视为慢查询 如果没有使用index的查询,也要被作为慢查询记录到日志中。 bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn