I would like to enable the slow query log during a certain time interval every day - 00:00:00 UTC to 00:10:00 UTC. Is there any method to enable the slow query log in such a manner?
Asked
Active
Viewed 178 times
1 Answers
0
I think this will do: Create two EVENTs
.
- One to run daily at midnight; it will execute
SET GLOBAL slow_query_log=ON
. - One to run daily at 00:10, and set it to
OFF
.

Rick James
- 135,179
- 13
- 127
- 222
-
Thanks! Will try the approach. – Annie Mar 06 '17 at 07:18