Mass Cleanup of Guest Users

You may also like...

2 Responses

  1. sean johnson says:

    Ember, thanks for the great tip and insight.
    Is there any new update to the methodology given that there are newer versions of WC and DB2?

    – Sean

    • Ember Crooks says:

      Not really, though I haven’t had to do it a few years. I’ve got a client coming up who might need it, we’ll see. In many cases, as long as your guest user creation rate isn’t too high, you can simply let dbclean run for a few weeks 24/7 and remove the users that way. A few deadlocks or timeouts might result, but sometimes it’s not bad enough to actually have to use another method like this. I also recommend deleting some smaller number using dbclean to get good timing estimates for deleting with dbclean. I generally assume I can delete 150 guest users per minute, but sometimes it is faster as hardware gets faster. Also if you have one of those unusual WCS sites that doesn’t take orders, you can modify the dbclean delete syntax to not check for orders and therefore run much faster.

Leave a Reply

Your email address will not be published. Required fields are marked *