Deleting huge chunks of data from mysql innodb
Posted
by mingyeow
on Server Fault
See other posts from Server Fault
or by mingyeow
Published on 2010-05-12T04:15:48Z
Indexed on
2010/05/12
4:25 UTC
Read the original article
Hit count: 427
I need to delete a huge chunk of my data in my production database, which runs about 100GB in size. If possible, i would like to minimize my downtime.
My selection criteria for deleting is likely to be
DELETE * FROM POSTING WHERE USER.ID=5 AND UPDATED_AT<100
What is the best way to delete it?
- Build an index?
- Write a sequential script that deletes via paginating through the rows 1000 at a time?
© Server Fault or respective owner