Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

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.

share|improve this answer
    
How do you know for sure? –  LVS Feb 23 '13 at 18:01
    
I remember reading that when researching the Nonprofit Starter Pack (NPSP) due to one of their data models. A master should not have more than 10k children. –  Mike Chale Feb 23 '13 at 19:35
3  
The advice refers to 'records' not 'objects'. While the docs don't say what happens, I've also encountered governor issues when attempting, for example to delete a master record with more than 10k records. The platform gives an error because the cascade delete would be to expensive. I had to delete the child records manually before deleting the parent record in that case. So as the docs say, try to avoid this. –  Andrew Fawcett Feb 23 '13 at 20:15

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

share|improve this answer

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.

share|improve this answer
    
What governor limit? Do you mean the 50K rows returned one? –  LVS Feb 23 '13 at 18:00
    
No thats a different one .50K is total number of query rows but a inner query can max return 10K records .Thats also a one of governor limit. –  Mohith Shrivastava Feb 23 '13 at 18:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.