0

I am using the serial mode of bulkUpdate/Insert. I am just wondering if there any other impacts apart from the speed.

  • 3
    Can you please edit this post to provide some more context around what you are doing? – Adrian Larson Dec 12 '18 at 20:17
  • The direct answer to this question is No. However it depends on use cases why you are using Serial Mode and if at all there's a scope for improvement, etc. You should take a look around some of the articles/documentation which discusses in details as when to use serial mode and their use cases. – Jayant Das Dec 12 '18 at 20:22
6

Serial mode specifically has a benefit (and the only reason you should use it): it relieves database contention. The trade-off is that it runs slower. That's the purpose of using serial mode.

  • True, I was getting some row lock issues when using bulkUpdates, That went away when making it serial.Also I was wondering would using the rest api update for mulitple records solve the row lock issues @sfdcfox – Rakesh Feb 15 at 18:19
  • @Rakesh Maybe, it depends on how many threads you run in parallel. The idea is that you must avoid trying to update child records that share the same parent in different transactions. If you only use one thread, you would minimize the risk of lock errors (but, of course, another user could be doing something to cause a row lock error as well). – sfdcfox Feb 15 at 18:24
  • yep, totally makes sense, But within the same rest update call, if we are updating lookup fields of multiple child records to a single parent id, it should not throw the lock errors right. – Rakesh Feb 15 at 18:43
  • @Rakesh Correct, as long as all child records with the same parent are in a single API call, there won't be a lock error for that reason. – sfdcfox Feb 15 at 19:01
2

On top of my head, No there should not be any impact. It would use the same number of API calls and the Same number of Bulk API job so should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.