max execution time and slow query log files?

Discussion in 'Databases' started by vetrivel, Aug 9, 2009.

  1. #1
    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.?
     
    vetrivel, Aug 9, 2009 IP
  2. chisara

    chisara Peon

    Messages:
    141
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    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.
     
    chisara, Aug 17, 2009 IP
  3. vetrivel

    vetrivel Peon

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    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.
     
    vetrivel, Aug 18, 2009 IP
  4. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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.
     
    premiumscripts, Aug 18, 2009 IP