Home > Database > Mysql Tutorial > body text

mysql慢查询日志命令_MySQL

WBOY
Release: 2016-06-01 13:07:41
Original
1030 people have browsed it

set global long_query_time=10 #设置慢查询时间为10秒

show global variables like 'long%' #查询慢时间记录

mysqldumpslow -t 10 /data/mysqldata/slowquery.log #从日至文件中查询前十条慢查询记录


my.cnf > 命令设置

log-queries-not-using-indexes  #记录下没有使用索引的记录

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