Home  >  Article  >  Database  >  How to construct slow query in mysql

How to construct slow query in mysql

coldplay.xixi
coldplay.xixiOriginal
2020-11-02 16:19:422211browse

Mysql method to construct slow query: 1. Modify the configuration file, add relevant code in [my.ini], define slow query time and slow query log record; 2. Enable slow query through MySQL database.

How to construct slow query in mysql

Mysql method of constructing slow query:

Method 1:

Modification Add a few lines to the configuration file in my.ini: Mainly the definition time of slow query (more than 2 seconds is a slow query), and the slow query log record (slow_query_log)

How to construct slow query in mysql

Method 2: Enable slow query through MySQL database:

How to construct slow query in mysql

##More related free learning recommendations:

mysql tutorial(video)

The above is the detailed content of How to construct slow query in mysql. For more information, please follow other related articles on the PHP Chinese website!

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