I have an problem when i'm dealing with an big size array (> 50k, sometimes > 100k depends on the fromDate and toDate in query). This data is retrieved from an static query that i can't change so that i can not use offset or limit. Afterthat, i have to insert 50k data into an table in postgres with using sequelize. Morever, when i've done retriving the data i have to change some value in each item in array. Ex:
array.map(item => {
if (item.some_field) {
item.condition_field = some_data;
}
return item;
})
The problem is the process is taking too long, do you guys have any suggestions for my problem ?