Home > Database > Mysql Tutorial > How to construct slow query in mysql

How to construct slow query in mysql

coldplay.xixi
Release: 2020-11-02 16:19:42
Original
2276 people have browsed it

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!

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