8

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?

3 Answers 3

11

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.

3
  • How do you know for sure?
    – LVS
    Feb 23, 2013 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, 2013 at 19:35
  • 4
    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. Feb 23, 2013 at 20:15
7

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

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.

2
  • What governor limit? Do you mean the 50K rows returned one?
    – LVS
    Feb 23, 2013 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. Feb 23, 2013 at 18:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .