Avoid scanning entire routing table during $merge stage planning

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: 4.2.24, 4.4.24, 6.0.10, 5.0.21, 7.1.0-rc2
    • Component/s: None
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-35905 we added a logic to partition a $merge stage on the shards.
      This logic requires scanning the entire routing table for the collection that before 7.0+ could potentially contain millions of entry.
      For collections of large number of chunks, this logic could take seconds to be executed.
      Additionally, this logic is creating a vector of the size of the routing table, potentially consuming several GBs of RAM.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: