What is the most efficient (ie. fastest) method fo...
# suitescript
e
What is the most efficient (ie. fastest) method for updating a single field across multiple records of a given type, say 10000-50000 item records? The basic example seems to be a full record load then save for each update, which seems like a slow, inefficenct method. More advanced methods involve map/reduce to run updates concurrently, but essentially uses the same load/save paradigm. Just wondering if there is some suitescript construct that I am missing.
m
a
probably just want to use a CSV import for something like that tbh
m
For use via SuiteScript you can create a file and then trigger the CSV import with N/task
👍 1
It would be interesting to compare performance of CSV import vs a Map/Reduce with submitFields
You can also try integrator.io (Celigo)'s data loader
a
CSV wins
i guess it depends how much concurrency you use, and if you're prepared to use all 5 CSV import jobs concurrently
i dont remember exactly the details but i coworker tested it and CSV won
m
And if you run scripts/workflows on CSV Import
a
well that would depend if you need them to run or not, if you dont then you turn them off... if you do then submitFields may not work cos any XEDIT wont have all the fields available to do what the script wants to do
actually aftersubmits shouldn't matter for performance
d
what about inline editing the records via a custom record as parent? did this for custom record children, about 500 per parent. Took the "update all the records" portion of the MR from a couple of hours to a few minutes (8k records total?)
requires some setup, as all the "children" records have to have their parent set first. And not sure if the performance would translate if the children weren't custom records
a
yeah situationally that very nice, but as you point out it has some limitations
it really just depends on your needs and the size of your data
👍 1
m
@David B I don't think this is possible if the child record isn't a custom record
d
good to know
t
You can try mass update
☝🏻 1
☝️ 1
d
thanks for digging that one out Michoel, can't get much more official then having battk say it's not possible 😅