-1

I would like to know , how to set up the long_query_time as 1 minute . I want the queries that run more than 1 minute in my slow_query_log . how to do that ? And kindly provide me how to restart the sql ? is it the command MySQL service restart ; ?

Thanks in advance. Prabhakaran.R

Kamlesh
  • 1
  • 3

1 Answers1

0

In my.cnf, add (or change to)

long_query_time = 60

and restart mysqld (The details depend on what OS you are using and whether you are using some package, such as WAMP, which has its own 'restart' mechanism.)

Or, you set it for the remainder of your session by executing this command. (The details depend on what client you are using.)

SET long_query_time = 60
Rick James
  • 135,179
  • 13
  • 127
  • 222