I have a very large dataset. (60M+)
Now I want to count the query data. I using collection.countDocuments(query) but it is slow
In my next js app, I wanna filter data like country and wanna show how much total data in that country.
How to retrieve the result faster??
steevej
(Steeve Juneau)
2
Please share your query and the supporting indexes.
The computed pattern might be of interest.
2 Likes
steevej
(Steeve Juneau)
3
@Ali_Sadain_Tanvir, is there any followup on this?