The CreatorCon Call for Content is officially open! Get started here.

Deleting all records from large (1TB+) table

Brian Arndt1
Mega Expert

We have a table in our production instance with over 1TB of data in it (1118168054 rows). I'm looking for guidance on the best way to purge this table without affecting system performance. I do not believe there is any reason to retain these records and no new records are being added to it. Would archiving (and destroying) be the most effective, or would it take too long or cause performance issues?

1 ACCEPTED SOLUTION

Brian Arndt1
Mega Expert

Thanks all for the replies but I think the correct answer is submit a case with ServiceNow Support. They can truncate the table in seconds.

View solution in original post

10 REPLIES 10

Adarsh Krishnam
ServiceNow Employee
ServiceNow Employee

While doing from background scripts add the attributes no_audit_delete=true and excludefromRollback=true which will make the deletion faster OR you can disable the checkbox record for rollback.

Ensure that the delete query is using the index as such its much more faster.

When you delete by navigating to the sys_db_object -->open the desired table and delete all records it should delete 100 thousand records in 10 minutes.