Home > Database > Mysql Tutorial > body text

MySQL Slow Query设置_MySQL

WBOY
Release: 2016-06-01 13:40:34
Original
1124 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!