Manual talk:DeleteArchivedRevisions.php

Equivalent SQL
As the code looks currently, this script is pretty simple and I'm fairly confident that it is equivalent to running these two SQL queries. This may be handy for anyone without SSH access to a server.

Note that this can run very slowly. I set this running to remove tens of thousands of spam text records, and my server was hung for over an hour while it ran.

Actually the more complex purging process (the second query) is not really within this script class. This script just invokes function PurgeRedundantText in Maintenance.php. This will actually check the archives table too, to avoid deleting text records referenced there. But since we know that this table is now empty, I've simplified the query a little. A more full SQL translation (which would run even slower) would be this:

Another alternative for people stuck with no SSH access. Extension:Maintenance or Extension:MaintenanceShell -- Harry Wood (talk) 20:50, 7 October 2012 (UTC)