I'm creating a tool that sets
slow-query-log
to ON
with long_query_time = 0
for 5 minutes to log all queries currently running.
The only thing I'm afraid of is that the slow_log will be too big very quickly.
From what I see if I delete the slow-query-log file, MySQL doesn't create it back until I run FLUSH SLOW LOGS
.
The question is: Is it safe to delete it while slow-query-log is on?
And do I need to FLUSH SLOW LOGS
before doing it? I tried to read the documentation but did not understand how FLUSH SLOW LOGS
is relevant and what is its exact purpose.
Asked by idan ahal
(131 rep)
Aug 27, 2024, 11:40 AM
Last activity: Aug 27, 2024, 02:12 PM
Last activity: Aug 27, 2024, 02:12 PM