there's opportunity to prepare some queries like this one, earlier on (eg, after we create the database connection), so that we don't have to prepare them each time we want to execute.  But, given that this (purge) operation probably doesn't happen often, it's probably not a huge saving.