Loading

Error 'Delete Operation Too Large' or Slow Performance When You Delete Records in Salesforce

Udgivelsesdato: Oct 9, 2026
Beskrivelse

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

'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.

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

Løsning

This article explains why deleting a record in Salesforce can be slow or fail with the 'Delete Operation Too Large' message, and how an Administrator can find and delete the related records so the affected record can be deleted.

Background Information on Delete Operations

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

According to The Force.com Multitenant Architecture, the 100,000 combined object delete limit is hard coded for application performance reasons. It is also a best practice not 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 the performance of deletes as well as other application areas.

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

Back Up Your Data Before You Delete Records

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.

How to Delete Affected Records or Improve Performance

To delete affected records or improve performance, an Administrator needs to identify where the related data or potential skew exists. Once the data has been located, it is necessary to delete or hard delete it by emptying those records from the recycle bin. This allows the related records to be eligible for physical deletion through the automatic scheduled background process, or the deletion can be started manually by customer request in a Support case.

Note: It is 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 the customer, on the client side, by an Administrator.

Physically deleting related records before 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.

How to Identify 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 be completed by reviewing the affected record's 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 are unable to locate related records via list views or reports, identifying the related data or skew may not be so obvious. There are a few options to identify all relationships to the affected record's object from others:

How to Identify Where Records Reside and Delete Related Data

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

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

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

The results of the queries should allow you to identify where the large relational data sets 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 are hard deleted and eligible for physical delete.

Once you have found where the large number of related records are residing, it is recommended to Export Backup Data from Salesforce and Export Data to create a file of the related records' IDs. Then perform a delete of the child or related records that are causing the affected record's delete contention or failure. See Insert, Update, or Delete Data Using Data Loader for more details.

Note: Save a copy of this file to a safe location for backup purposes.

What to Do After Deleting the Affected Record's Related Records

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

Vidensartikelnummer

000382586

 
Indlæser
Salesforce Help | Article