long_query_time Changes Fail to Be Applied
Scenario
After the value of long_query_time was changed from 0.1s to 0.2s on the console, slow query logs still included slow SQL statements whose execution duration was less than 0.2s.
Possible Causes
Changes to long_query_time on the console take effect globally, but only for new connections. As existing connections continue to use the original value (0.1s in this case), slow SQL queries whose execution duration was less than 0.2s are still reported for existing connections.
This problem is caused by the MySQL engine. Changing any of the parameters that take effect for all databases may also have this problem.
Solution
If you need certain session connections to use the new value, close the session connections and re-establish them.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot