Salesforce says “As a best practice, don’t exceed 10,000 child records for a master-detail relationship.” here : http://na1.salesforce.com/help/doc/en/relationships_considerations.htm
What does “for a relationship” mean? Per Master object or per Master record? The former would be little too limiting but still the documentation is not clear for me.
Any help?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
This statement
As a best practice, don’t exceed 10,000 child records for a master-detail relationship.
Refers to record relationships, thus it is refering to a parent record with the number of related child records not exceeding 10,000. Thus it means ‘per Master’ record.
Method 2
The 10k children record recommendation is performance related because of data skew in large data volumes and the impact of inspecting all of those child records when computing sharing visibility.
Force.com Engineering – Extreme Force.com Data Loading Part 1: Tune Your Data Model
Method 3
One of the reasons i see why its is suggested is as an inner query if we query child records for a parent record(single parent record) and if that child records are more than 10K for single parent record then its a governor limit .Hence its advisable to keep child record count less than 10k for a Parent record.
There are also governor limits on DML incase no of records are more than 10K.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0