Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-99639

Avoid deduping DISTINCT_SCAN output in distinct()

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            alya.berciu@mongodb.com Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: