For this we need to edit my.cnf file (This should be in /etc directory)
we need to enter following lines :-
log-slow-queries=/logs/mysql/slowQueries.log
long_query_time=30
This time is in seconds , so if any query will take more than 30 seconds to execute then the query will get logged in the
/logs/mysql/slowQueries.log file
0 Comment(s)