Suggested answer

Data skew is an uneven distribution of records that causes locking and sharing-recalculation problems. There are three types worth distinguishing, because the remedies differ:

1. Account (parent-child) data skew: More than roughly 10,000 child records under one Account. Salesforce locks the parent during child DML and recalculates implicit sharing across all its children. Symptoms are UNABLE_TO_LOCK_ROW during loads and very slow sharing recalculation. Remedy: distribute the children across a set of bucket parent records so no single parent exceeds the threshold.
2. Ownership skew: More than roughly 10,000 records of one object owned by a single user — typically an integration user or a placeholder 'unassigned' user. Because ownership drives role-hierarchy sharing, any change to that user's role forces a very expensive recalculation. Remedy: place the owner outside the role hierarchy, or at the top of it with no role, and spread ownership where the business allows.
3. Lookup skew: The same concentration problem on a lookup field rather than a master-detail. It still causes brief parent locks during child DML. Remedy: more parent records, batch by parent, or defer populating the lookup until after the bulk insert.
4. Prevention: Architecturally I try to avoid the placeholder-record pattern entirely. When the business genuinely needs an 'unknown customer' concept, I model it as a set of buckets from day one rather than a single record that quietly grows past the threshold two years later.

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.