Deleting huge chunks of data from mysql innodb
Posted
by ming yeow
on Stack Overflow
See other posts from Stack Overflow
or by ming yeow
Published on 2010-05-12T04:28:31Z
Indexed on
2010/05/12
4:34 UTC
Read the original article
Hit count: 456
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?
© Stack Overflow or respective owner