Skip to main content
Solved

Bulk update - can I speed this up?

  • September 19, 2022
  • 2 replies
  • 4 views

Forum|alt.badge.img+10

Hello,

I have a table with about 1700 records. I’m pulling a couple of records and doing some math on all the rows, then updating the result in a new record. The bulk update code I’m using is waaaay faster than a single row update, but it’s still taking about 45-60 seconds. That’s too slow for me to run an automation, which has a 30s timeout. Is the following code inefficient?

while(updatedRecords.length){
await table.updateRecordsAsync(updatedRecords.splice(0,50));
}

Regards,
Scott

Best answer by kuovonne

You code isn’t inefficient. It just isn’t as efficient as you need it to be.

This thread has suggestions for dealing with updating thousands of records in an automation.

View original
Did this topic help you find an answer to your question?

2 replies

kuovonne
Forum|alt.badge.img+27
  • Brainy
  • 6001 replies
  • Answer
  • September 19, 2022

You code isn’t inefficient. It just isn’t as efficient as you need it to be.

This thread has suggestions for dealing with updating thousands of records in an automation.


Forum|alt.badge.img+10
  • Author
  • Inspiring
  • 15 replies
  • September 19, 2022
kuovonne wrote:

You code isn’t inefficient. It just isn’t as efficient as you need it to be.

This thread has suggestions for dealing with updating thousands of records in an automation.


Thank you! I don’t have to update every record, so that’s a great suggestion.

Do you have any examples of a mega batch update? I would have approached it the way it was discussed in the thread, but I got the impression that did not work.


Reply