What part is taking a long time, the query, the preprocessing? It’s impossible for us to tell without seeing more code. That said, a simple find({})
corresponds to a collection scan which should be very fast.
If the problem is that the query is slow, then adding batching with skip/limit/ sort({_id: -1})
could make the problem worse.
Could you include the full code (redacting the private/sensitive parts)?