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.
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)
Method 2: Enable slow query through MySQL database:
##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!