-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
We have a 'fast' count mode that runs in cases like a query on
{a:'c',b:'d'}with index
{a:1,b:1}. (Among other restrictions, all fields of the index must be present and the queried values must not be objects or numbers.) This optimization adds implementation complexity and has been a source of bugs (eg SERVER-4529). Additionally, the performance of this special counting mode has likely been degraded by changes over time (eg SERVER-3449).
Also, I'm not sure if we've actually measured the performance of fast count mode. We might consider removing it, otherwise we might refactor it out of the main query path.
- is related to
-
SERVER-4529 fast count mode should not be used when matching against null
- Closed
-
SERVER-1752 improve the performance of simple counts
- Closed