List:General Discussion« Previous MessageNext Message »
From:Larry Martell Date:April 25 2013 12:19am
Subject:Performance of delete using in
View as plain text  
I have a table that has 2.5 million rows and 9 columns that are all
int except for 2 varchar(255) - i.e. not that big of a table. I am
executing a delete from that table like this:

delete from cdsem_event_message_idx where event_id in (....)

The in clause has around 1,500 items in it. event_id is an int, and
there is an index on event_id. This statement is taking 1 hour and 5
minutes to run. There is nothing else hitting the database at that
time, and the machine it's running on is 97% idle and has plenty of
free memory. This seems extremely excessive to me. I would guess it's
because of the in clause. Is there some better way to do a delete like
this?
Thread
Performance of delete using inLarry Martell25 Apr
  • Re: Performance of delete using inDenis Jedig25 Apr
    • RE: Performance of delete using inRick James30 Apr
Re: Performance of delete using inLarry Martell25 Apr
  • Re: Performance of delete using inLarry Martell25 Apr