About deleting a large number of records

bonsai
Mega Sage

※Paris version

 

I want to empty a table with 2 million records.

I tried to delete Records in bulk using "deleteMultiple ()", but the instance freezes and the Records are not deleted.
Is there a limit to the number of items that can be deleted at once?
Also, is there a way to remove it efficiently?

 

1 ACCEPTED SOLUTION

subramanian
ServiceNow Employee
ServiceNow Employee

The below should work for records in excess of 2 million.

deleteMultiple();

 

Having said that if this is a recurring process there are other options in ServiceNow instance that you can explore -  Auto flush for e.g.

View solution in original post

10 REPLIES 10

Saurav11
Kilo Patron
Kilo Patron

Hello 

You can do it using the below as Servicenow provides OOB functionality to delete all records from table

Go to the table 

find_real_file.png

Search for the table where you want to delete all records

Once found open the record:-

There you will see an button to delete all records:-

find_real_file.png

 

It will give a popup as below type the word and click ok all the records from the take will be deleted

find_real_file.png

Please mark answer correct/Helpful based on Impact.

I tried running this button, but it froze and the record wasn't deleted.

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Best way is to use the SNOW provided button shown below

find_real_file.png

 

-Anurag

 

-Anurag

The below should work for records in excess of 2 million.

deleteMultiple();

 

Having said that if this is a recurring process there are other options in ServiceNow instance that you can explore -  Auto flush for e.g.