I have an collection with billion records. I need to update all records every 5 minutes. It will consume a lot of memory if I query all records then update every record by loop. Does mongoose/node-mongodb-native support to update every record one by one. My logic is get one record, do some calculation on that record, then save back to database.
Asked
Active
Viewed 117 times
0
-
The solution depends on if this update can be done directly on the mongoDB server? – Jason Cust Jul 15 '15 at 14:42
-
yes, directly on the mongoDB server – Vo Thanh Thang Jul 15 '15 at 15:45