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

Improve cluster distinct command to skip aggregating results when targeting a single shard

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      At the time of writing, the cluster distinct command sets up a BSONObjSet to deduplicate results across shards. In the general case this is necessary, but when targeting a single shard, this is unnecessary. As such, this ticket tracks the work to return the lone shard response directly in the case of targeting a single shard.

      For context, we target a single shard when:

      • The target namespace is unsharded (either untracked or unsplittable)
      • The target namespace is sharded and all targeted chunks reside on a single shard

            Assignee:
            Unassigned Unassigned
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None