I have a lot of data to fetch from a mongodb database. I can't load all the data at once on the server because it's too big and I would run out of memory.
If I use forEach, will it fetch everything and load everything on the server then apply the function on each of them?
OR
Will it fetch the first element, apply function, load second element, apply function... until the last one?