Doubts about MySQL slow query slow the content of query log records

Source: Internet
Author: User

Initial: Due to the high CPU consumption of the newly installed server, the response is not timely troubleshooting, because the environment based on the most basic lamp architecture

Think of turning on MYSQL slow_query_log slow query log for reasons analysis;

But after seeing the log content is a bit dazed "I clearly set slower than 2 seconds to record slow query" but the content is as follows:

A lot of log query_time actually only a few milliseconds. This causes too much file content to be analyzed with ease

Later found: Http://dba.stackexchange.com/questions/21308/mysqls-slow-query-log-strange-query-time

It turns out that because:

Shield the log_queries_not_using_indexes; restart MySQL;

echo >/data/logs/mysql-slow.log

All slow queries re-recorded;

And then you can safely analyze the

Doubts about MySQL slow query slow the content of query log records

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.