Safely clean up mysql database

Hi

As we use mysql for storing all the metadata for druid services and utilities like lookups, ingestion task details, segment info etc.

I have been using druid from quite some time and thus my table size( druid_audit, druid_tasks, druid_tasklogs etc) has increased a lot and need to clean older data(ingestion task details, obsolete lookup info etc). Is there any way to safely cleanup data so that none of the live services are affected.

Thanks

Abhishek Jain

Hi Abhishek,

In general it’s safe to delete entries from audit and tasklogs tables whenever you want (well, safe so long as you have no need for the audit info).

It should also be safe to delete entries from the tasks table if they are not running (based on status_payload) and old enough (based on created_date) that nothing is still trying to read their status. A week should be more than safe.