Search
Twitter
« Configuring State & Country Picklists | Main | Salesforce: Leads Again »
Thursday
Jan172013

Avoiding Data Skew Situations

 

Prevent account data skew situations that produce unwanted lock contention and diminished database concurrency

You should always strive to recognize and avoid account data skew situations that produce unwanted lock contention and diminished database concurrency. Correcting a data skew can be painful because you’re changing ownership, which in turn triggers sharing calculations. Here are some tips to help you avoid account data skews.

  1. Design architecture to limit account objects to 10,000 children. Some possible methods include creating a pool of Accounts and assigning children in a round robin fashion or using Custom Settings for the current Account and the number of children.
  2. Consider a Public Read/Write sharing model in which the parent account stays locked, but sharing calculations don’t occur.
  3. If you have a skewed account, re-distribute child objects in chunks during down hours to reduce the impact of record-level lock contention.  Batch Apex or the Bulk API are useful ways to re-parent.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.