MySQL Forums
Forum List  »  Optimizer & Parser

Why does this delete statement take so long?
Posted by: Jim Daemon
Date: June 15, 2006 02:11PM

When I run:
DELETE FROM ftboscaff_rt_session WHERE UNIX_TIMESTAMP( modified ) < 1150318826

(naturally the time stamp value is going to change) the query takes an average of 0.80s to run.

Is there any way to reduce the amount of time this type of query takes to run? Would an index on the modified field help?

Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.



Edited 1 time(s). Last edit at 06/15/2006 02:16PM by Jim Daemon.

Options: ReplyQuote


Subject
Views
Written By
Posted
Why does this delete statement take so long?
5083
June 15, 2006 02:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.