[Mediawiki-l] Cleansing database for launch

Paul Coghlan pcoghlan at usa.net
Tue Oct 23 11:50:35 UTC 2007


I am once again returning to the task or cleaning the database prior to a
launch.

We have several hundred thousand pages and up to 20-30 revisions per page. I
need to strip all revisions prior to the current one to effectively clear
the history for each page.

I know from a previous message from Rob that the DeleteOldRevisions.php
script a bad way to go and may give unexpected results so I am tackling this
directly in SQL.

It would appear that deleting all entries in tblrevision EXCEPT the latest
(i.e. chronologically latest rev_timestamp) and each of the associated
entries in the text table (where revision.rev_text_id=text.old_id) is the
way to go.

Does this look like it will give me what I am looking for, deleting all
revisions/txt except the latest? Is there anything else I need to delete to
clean the database?

Bearing in mind this site is pre-launch and has nothing other than straight
forward textual pages, albeit a lot of them.

Thanks,
Paul


More information about the MediaWiki-l mailing list