Clean up (table) with 50M records

P Seth
Tera Contributor
Hello Experts, Recently i came across the table ( incident activity log Assignment) which has nearly 60 million records and i want to keep the data only for last 2 years , anything older than 2 years has to be deleted . Now, since clean up has to be executed in production , Performance has not to be compromised . What should be the best practice to do it .. Table cleaner .. scheduled Script with limit ?? OR Script or should i consult with Servicenow Support ??
2 REPLIES 2

Not applicable

Hi @P Seth ,

 

Table cleaner is the best way to delete however this scenario is bit different looking at the record size 50M.

 

I would recommend to have a scheduled script with limit (each day after business hours or during weekends) and make sure not to trigger any BRs/workflows/flows by using setWorkflow(false) and Properly test in dev

 

Refer Table Cleaner v/s Script : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0717791#:~:text=and%20workflo... 

 

Hope this helps!!!

 

 

AnciaminneM
Tera Contributor

You can use Data Management Delete Job as well.
Refer https://www.servicenow.com/docs/bundle/xanadu-platform-administration/page/administer/managing-data/....

This ensures that you have always have a rollback and execution details.