Batch processing of huge tables
May. 27th, 2010 03:14 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
So, I just committed a code merge for an issue we found via LJ, where comment properties weren't being deleted when the comment was.
That takes care of new properties, but we still have old ones hanging around! How do we handle this? I'm assuming that due to the size of talkprop2, doing:
would be a horrible idea, but what can we do to make it less horrible? Should we even try to delete?
That takes care of new properties, but we still have old ones hanging around! How do we handle this? I'm assuming that due to the size of talkprop2, doing:
delete talkprop2 from talkprop2, talk2 where talkprop2.journalid=talk2.journalid AND talkprop2.jtalkid=talk2.jtalkid AND talk2.state="D";
would be a horrible idea, but what can we do to make it less horrible? Should we even try to delete?