Loading

Error 'Delete Operation Too Large' or too slow when you delete records

Publiceringsdatum: Apr 2, 2026
Beskrivning

Deleting a record in Salesforce may result in long wait or load times, timeouts, or the following messages:

 

'Delete Operation Too Large

You can’t delete more than 100,000 combined objects and child records at the same time. Select fewer records to delete. If you're trying to delete one object that has more than 100,000 child records, delete an appropriate number of child records before deleting the object.

Click here to return to the previous page.

DELETE_OPERATION_TOO_LARGE:Cascade deleting too many records.'


This issue is commonly the result of a large number of records being associated with the deleted record through a Master-detail or Lookup relationship. 

In order to resolve record deletion performance issues and the 'Delete Operation Too Large' message, an Administrator will need to identify and delete related records, empty them from the recycle bin, and then engage Salesforce Support to initiate a manual physical delete (PD) in order to fully purge the related records from the system before retrying deletion of the affected record.
 

Background information:


Delete operations are one of the most resource expensive database transactions that can be performed. For more detailed information on this see Large Data Volumes - Deleting Data. It is also recommended to review the Object Relationships Overview documentation to gain an understanding of cascading and other unique deletion behaviors with regards to different object relationship types.

As per The Force.com Multitenant Architecture the 100,000 combined object delete limit is hard coded for application performance reasons. It's also best practice and not recommended to exceed 10,000 child records associated to a parent record through lookup or master detail relationship fields. Approaching or exceeding 10,000 related records is considered data skew and can adversely affect performance of deletes as well as other application areas.

For more details on data skew and best practices, review the following:

 
Lösning
 
Warning
Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to ensure the operation was successful through manually opening and verifying that the corresponding records are correct in Salesforce.

To delete affected records or improve performance an administrator will need to identify where the related data and/or potential skew exists. Once the data has been located it's necessary to delete and/or hard delete by emptying those records from the recycle bin. This allows the related records to be eligible for physical deletion via the automatic scheduled background process or it can be manually started via customer request in a Support case.

Note: It's not possible for Support to perform the prerequisite metadata analysis, identification, and deletion of the related objects and records for customers. This work is outside the scope of Support's offerings and the following steps must be performed by customers or client side by an Administrator.



Physically deleting related records prior to deleting the affected record is required to resolve occurrences of the 'Delete Operation Too Large' message. This overall process is one of our Best Practices for Deployments with Large Data Volumes - Deleting Data.
 

Identifying related objects:


If your organization's data model is relatively simple, with only a handful of relationships to the affected record's corresponding object, identifying where the high count of related records resides may completed by reviewing the affected records related lists, running reports, or performing SOQL queries.

If your data model is complex and the affected record's custom object shares numerous relationships with other objects or you're unable to locate related records via list views or reports - identifying the related data or skew may not be so obvious.

The good news is, there are a few options to identify all relationships to the affected record's object from others.


- Schema builder allows you to graphically see object relationships to one another. For detailed instructions, refer to Use Schema Builder to identify and query object relationship fields for delete performance

- It's also possible to examine the Enterprise WSDL for your organization as outlined in the 'Identifying Parent and Child Relationships' topic of the SOQL and SOSL Reference guide.

 

Identifying where records reside and deleting relational data:


Once all of the affected record's potentially related objects have been identified, it's possible to run a SOQL query against each object to identify where the related data may be residing.

For example, if you're unable to delete an Account perhaps there are too many associated Contact records. Substituting the affected Account's Unique Record IDs in Salesforce for <RecordIdHere> in following example query on the Contact object will provide the number of Contacts related to the Account:


SELECT count() FROM Contact WHERE AccountId = '<RecordIdHere>'

Results of the queries should allow identification of where the large relational data set(s) may be residing. If no related records are returned, try performing a queryAll() (or Export All in Data Loader) operation to include any potentially soft deleted records in the recycle bin. If the related records have already been deleted, empty your recycle bin to ensure that they're hard deleted and eligible for physical delete.

Once you have found where the large number of related records are residing, it's recommended to Export Backup Data from Salesforce and Export Data to create a file of the related record's Ids to then perform a delete of the child or related records causing the affected record's delete contention or failure. See Insert, Update, or Delete Data Using Data Loader for more details. Note: We also recommend that you save a copy of this file to safe location for backup purposes. 
 

After deleting the affected record's related records:


View and Purge the Recycle Bin to empty the deleted records (effectively hard deleting) from the recycle bin. The physical delete process will eventually expunge the eligible hard deleted records however, if the deletion needs to occur before the natural timing, please log a case with Support to authorize initiating and performing a manual physical delete.

 
Knowledge-artikelnummer

000382586

 
Laddar
Salesforce Help | Article