RE: Performance of delete using in

2013-04-30 Thread Rick James
ginal Message- > From: Denis Jedig [mailto:d...@syneticon.net] > Sent: Wednesday, April 24, 2013 10:50 PM > To: mysql@lists.mysql.com > Subject: Re: Performance of delete using in > > Larry, > > Am 25.04.2013 02:19, schrieb Larry Martell: > > > delete

Re: Performance of delete using in

2013-04-24 Thread Denis Jedig
Larry, Am 25.04.2013 02:19, schrieb Larry Martell: delete from cdsem_event_message_idx where event_id in () The in clause has around 1,500 items in it. Consider creating a temporary table, filling it with your "IN" values and joining it to cdsem_event_message_idx ON event_id for deleti

Re: Performance of delete using in

2013-04-24 Thread Larry Martell
I changed it to delete one row at a time and it's taking 3 minutes. On Wed, Apr 24, 2013 at 6:52 PM, Larry Martell wrote: > That is the entire sql statement - I didn't think I needed to list the > 1500 ints that are in the in clause. > > Also want to mention that I ran explain on it, and it is u

Re: Performance of delete using in

2013-04-24 Thread Larry Martell
That is the entire sql statement - I didn't think I needed to list the 1500 ints that are in the in clause. Also want to mention that I ran explain on it, and it is using the index on event_id. On Wed, Apr 24, 2013 at 6:49 PM, Michael Dykman wrote: > You would have to show us the whole sql state