Help with deleting 2 million posts efficiently in MySQL!
I have a running VB3 forum and really need to delete around 2 million posts from it.
A few weeks ago I was researching and found two different forum owners who had written custom scripts to do this. (They didn't publish the scripts.) However, now I can't find those posts again. I believe those forum owners said they found it was much better to use a shell script to directly acess the database. One of them said the script was not hard to write and was quick to perform the tasks.
I could use any advice on how to accomplish this task. I would like to minimize the downtime.
It seems I would stop mysql, backup the database, run the custom script, then optimize the tables, and put the site back online?
It seems wise to get a custom script instead of simply running SQL commands and dropping anything with an old date from the posts, attachments, polls, and thread tables? Or can I simply do this? I would also want the search index(es) and other parts "slimmed down". (I did not want to purge old users however, especially if they ever made a post... including deleted posts.)
I do want to delete the posts without reducing the users' post counts as well.
Thank you.
|