Details
-
Improvement
-
Resolution: Gone away
-
Major - P3
-
None
-
None
-
None
-
None
-
Not Needed
Description
use `CountDocuments` to get count is slowly than useing mongoshell, By looking log of mongodb, it seems like `CountDocuments` will use `aggregate` to compute count.
mongoshell spend 1660ms, `CountDocuments` spend 2436ms. the filter count is 349326, the collection count is 19492668, and i have created index.
Are there any way to improve the performance?