-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
We always try to dedup DISTINCT_SCAN output when we use the distinct() command, even if we know that our index is not multikey, and our DISTINCT_SCAN key is on the first field in the index. We can likely safely avoid doing anything other than returning the output in this case.
Note: this should automatically work out of the box if we did SERVER-25899, because that is what the $groupByDistinct optimization does.
- related to
-
SERVER-25899 Make the distinct command always execute as an aggregation pipeline
- Backlog