Hi, For the past two weeks i am getting the error as max execution time exceeded . then i incresed it to 600 second from 30 second. But still i am getting the error as it exceeded the 600 second. So i request the server team and the provided the slow log files. During the investigation process i found that even a delete query recorded in that log(LOG WILL BE TAKE PLACE IF IT TAKES MORE THAN A MINUTE). EX: DELETE FROM tablename WHERE xxedr IN ('d64fc16800f9dc1cbd2a404e1f5a7948','307b8cecc511db77ab43f1ffed77c597') OR xxxxedr IN ('d64fc16800f9dc1cbd2a404e1f5a7948','307b8cecc511db77ab43f1ffed77c597'); When i run this query in the phpmyadmin it just takes .002sec, What is wrong ? How to overcome this issue. Please advice me.?
That would be odd, are you sure it is the query? Could you have an infinite loop in your code, maybe looping over a return value with a bad comparison.
yes it is valid query . No ,i dont think it will have infinite loop. what i feel now after a lot of analaysis is table wont have proper indexies. So could you people guide me on how to add proper index to the table.
well you will probably have to add an index on xxedr and a separate one on xxxxedr. Do an EXPLAIN DELETE + rest of your command in phpmyadmin and show the results.