You can configure mysqld to log slow queries in the aptly named slow query log.
您可以配置mysqld将这些慢速查询记录到适当命名的慢速查询日志中。
Reading through the slow query log is best done with the mysqldumpslow command.
阅读慢速查询日志最好是通过mysqldumpslow命令进行。
Listing 1 shows the configuration required in my.cnf to enable the slow query log.
清单1给出了要启用慢速查询日志需要在my .cnf中所做的配置。
Based on the information available in that report, you can discover whether the problem is a result of slow PHP execution or a slow query.
根据报告中的可用信息,您就可以发现问题是由PHP执行慢还是查询慢引起的。
In some cases, joining on unindexed columns can result in a slow query.
在某些情况下,联接非索引列会使查询速度变慢。
If the slow query log is enabled, the query is logged to the slow query log file.
如果启用了慢查询日志,则查询将记录到慢查询日志文件中。
If the slow query log is enabled, the query is logged to the slow query log file.
如果启用了慢查询日志,则查询将记录到慢查询日志文件中。
应用推荐