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

Shard Targeting for $in statements

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      HI 

      Working with a Client we were exploring ways to mitigate load issues on the mongod hosts on a Sharded cluster. 

      The particular client is doing multiple $in statements in each query but have large lists for up to 1000 entries per $in part.  Based on testing on both Our and the client side we were able to see significant advantages of trying to target each $in's entries to a single shard. Thus avoiding scatter gather queries foe each fo the $in queries.

      The optimisation could be both on the mongos or on the driver side, and on the dirver and could make it invisible to the client.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              max.hirschhorn Max Hirschhorn
              Reporter:
              dawid.esterhuizen Dawid Esterhuizen
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: