Overcoming data skew
Automatic scaling is an expected feature of the Salesforce platform, particularly as the count of records for a particular object increases. Customers will demand a consistent level of performance when tens of thousands of records of the same type are present within the system. There are a couple of performance degradations that happen in a couple of select use cases. These are as follows:
- A user owns more than 10,000 records of the same type (such as a user owning over 10,000 account records). This is known as ownership skew.
- A single account record has a large number of child records, such as 10,000 or more contact records with the same account as their
AccountId
lookup. This is known as account skew. - Similar to account skew, when a large number of child records (10,000+) are associated with the same parent there can be performance problems. This is known as lookup skew.
We'll look at the causes for each of these and how they can be...