06 Jun Lookup Skew In salesforce
If you regularly perform Salesforce implementations with objects that store a lot of records, you probably already know about the strategies that you can use to appropriately manage and distribute your data. Some of the more obvious strategies include using indexes, skinny tables, archival strategies, and even divisions.
Read this blog post to learn both how lookup skew affects objects with large volumes of data and what you can do now to minimize its effects.
Types of Salesforce Data Skew
You’re probably wondering what lookup skew is and what kind of trouble it can cause, but before we head down those paths, let’s make sure you are familiar with the concepts of account data skew and ownership skew.
Account Data Skew
Certain Salesforce objects, such as accounts and opportunities, have special data relationships that maintain parent and child record access under private sharing models. If too many child records are associated with same parent object in one of these relationships, this imbalance causes something called “account data skew,” which in turn causes performance problems.
Similarly, when a large number of records with the same object type are owned by a single user, this imbalance causes something called “ownership skew.” Ownership skew also causes performance problems, which can surface when you’re managing your role hierarchy and sharing rules.
Lookup skew happens when a very large number of records are associated to a single record in the lookup object. Because you can place lookup fields on any object in Salesforce, lookup skew can create problems for any object within your organization.
Let’s take a look at an example.
Company XYZ has 500,000 accounts in its production instance of Salesforce. The company’s sales organization wants to track an educational achievement level, so it configures the following custom object to store an achievement level and a description.
Next, it adds the achievement level to the account object as a lookup field.
Company XYZ then creates three achievement levels, into which all of its accounts must be categorised.
Finally, Company XYZ loads the update to its account records so that it can associate each account with an achievement level. No problem, right? Wrong. What we have just created is a very simple example of lookup skew. Even if the distribution between the lookup records is evenly split, you will have 166,000 accounts looking up to each of the three achievement levels. Lookup skew occurs when a very large number of records look up to the same record on a lookup object regardless of whether that lookup exists on a single object or across many objects.
“Explore – Techila Global Services, A Salesforce development company”