How to delete large number of records from core_company table.

HrishabhKumar
Kilo Sage

We are trying to cleanup duplicates from our core_company table. In order to do that we have to delete a large number of records. i.e 11,000, 80,000 etc.

I've tried the following options but it takes a lot of time and all records are still not getting deleted:

1) Script: takes time and deletes only 20..30% of records.

2) Data Manager> Delete all with preview: Takes internity to complete i.e 3-4 hours, deletes 90% records.

3) Direct deletion from tables list view: quick but deletes only 100 records in one go.

 

Please suggest the best way to delete records from core_company table.

4 REPLIES 4

SANDEEP DUTTA
Tera Patron
Tera Patron

Hi @HrishabhKumar ,

The best Practice has been defined by ServiceNow in this KB: Mass-Deletion and excess data management recommendations - Support and Troubleshooting

 

But for now, you have to follow Data Manager, i know it's slow and takes very long but that will do justice.

 

 

Thanks,
Sandeep Dutta

Please mark the answer correct & Helpful, if i could help you.

I have created a data manager deletion job, with the following procedure:

1) Open core_company list view.

2) Filter records to be deleted.

3) click on three dots icon near any column> Data Management > Delete All with preview

4) Landed on Data Manager job

Screenshot 2025-06-19 at 11.04.46 AM.png

The issue is I don't see any filter condition, or preview button. I've waited for more than an hour kept reloding the page but filter and preview buttons are not visible.

 

@HrishabhKumar 

try to clear instance cache using cache.do and then logout and login again and then try again.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@HrishabhKumar 

I suggest to use Data Manager, let system handle the deletion and the cascade effects.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader