I've got a civicrm database of 1.4 Go (information available in PhpMyAdmin) 1Go is used by civicrm_activity table I would like to know if have to clean, purge the database to reduce its size, cache or others maintenance actions.

I find some actions on documentation for cache files but nothing about database

Thanks for advices


civicrm_activity is a legitimate table with legitimate data. You can use the API to mass-delete activities - but only you (and/or your users) can determine what represents data that is reasonable to delete.

If it's that large, I suspect it's quite likely that you're sending frequent mailings to large groups of people - the mailing history might be reasonable thing to delete.

  • Do you know if deleting old mailings will remove the activities too? We've got a bad case of this with a few clients. For one, civicrm_activities is 3G. (Also would be nice to have a gui to batch delete/archive mailings but that's for a different convo).
    – herb
    Apr 16 '20 at 19:08
  • @herb Doing SHOW CREATE TABLE civicrm_mailing doesn't reveal any foreign keys - so it would have to happen at the PHP level if it happens. And frankly, I doubt it; I know deleting a Contribution Batch doesn't delete the associated activity (with disastrous results). I think someone wrote an archiver though - if you grab me on Mattermost I can tell you who to talk to. Apr 16 '20 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.