I have to fetch the large amount of data is about 3 Milions of docs. But the query gets very very slow .
I am trying to fetch the data in the chunk of 50k .
Tried using skip but as the chunk increases its get very very slow.
tried using range - like in every chunk fetching the data greater that last chunks last id this is also slow.
i have added compound index including all the fields that i have to make query with. this wokred fine but only for initial 4-5 calls.
Can anyone pleas suggest me best way to fetch the 3m of data.