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?
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Apr 24
Larry Martell Re: Performance of delete using in
Apr 24, 2013; 18:52
Larry Martell
Re: Performance of delete using in
Apr 24
Larry Martell Re: Performance of delete using in
Apr 24, 2013; 19:31
Larry Martell
Re: Performance of delete using in
Apr 25
Denis Jedig Re: Performance of delete using in
Apr 25, 2013; 07:50
Denis Jedig
Re: Performance of delete using in
Apr 30
Rick James RE: Performance of delete using in
Apr 30, 2013; 23:00
Rick James
RE: Performance of delete using in
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!