TL/DR: Events table growing fast. How to clean it up safely?
Details:
We’re generating millions of Octopus events per month, because we have many automated processes that generate many actions through the API, specifically tons of artifacts creation/deletion.
I’ve looked into the biggest tables, and by far the Events table is the biggest.
Total DB size is 65GB and growing every day.
Is there some official documentation and SQL query on how to clean up the Events table?
If possible, I’d like to target some specific events (artifacts).
Whilst we don’t recommend manually interacting with the DB, we recognise that the events table is a pain point for many customers.
Our best practice for this would be to create a new table and move/archive items from your events table to reduce the size but still retain the data.
In release 2023.3 (currently aiming for early September) we will be including an audit log archiving feature which would resolve this problem for you if you are able to wait until then.