I have collection with 60000000 Record. When running this query it take 5 min.
collection.Find(f => f.EVN_EVT_PRS_FIRST_NAME.EndsWith("yasmine"))
.SortBy(o=>o.EVN_EVT_PRS_FIRST_NAME).Skip(1600000).Limit(20).ToList();
Produces:
[
{ $match: { $text: { $search: \"sharma\" } } },
{ $skip: 160000 },
{ $limit: 20 },
{ $sort : { EVN_EVT_PRS_FIRST_NAME : -1 } }
]
this query take 6 min
Is there any way to fetch the data faster.