-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Query
-
None
Whenever we use count in the end `count_documents` in Mongo::Collection::View::Readbale is called. This builds a pipeline with `$group: { _id: 1, n:
{ $sum: 1 }}``
On a collection with about 3 mio documents this takes over 15 seconds to execute and consumes about 20 gb of memory.
In my opinion this is a bug - or maybe a misunderstood feature?
Can someone help me here?
- is caused by
-
SERVER-69257 COUNT_SCAN plan not selected when unfiltered $group + $sum on _id performed
- Needs Scheduling