|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Larry Martell (larry.martell
gmail.com)
Date: Wed Apr 24 2013 - 19:19:38 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]