Batch Update in Salesforce

157 Views Asked by At

I am trying to update around 0.2 million records with a constant value for a field. However using data loader it takes too much time & i get cpu time limit error. Is there any other way to achieve update these records?

1

There are 1 best solutions below

0
David Reed On

You'll need to set your Data Loader batch size lower. It's common for CPU timeouts to result in orgs that use complex or recursive declarative customization, or inefficient Apex triggers, when the default batch size of 200 is in use.

Experiment with reducing the batch size in Data Loader settings until you find the point at which CPU timeouts stop occurring. I'd suggest halving it to 100, then 50, and so on. Presuming that you're able to update these records in the UI, there will be some batch size (potentially 1) that will work in Data Loader.