0

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?

Annie
  • 135
  • 2
  • 15

1 Answers1

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