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.
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:
| 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. |
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.
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.
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:
000382586

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.