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

Apply index filters to individual $or clauses for rooted $or queries

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

      Assume that I have a $or query as below:

      {$or : [ {query1}, {query2} ] }
      

      And the index filters are configured for query1 and query2 separately.

      Currently the query engine doesn't use the index filters for these sub-queries in the $or clauses, but rather looks for an index filter set on the entire query shape. It would be nice if the $or clause shapes use the index filters for them individually, so that we can "hint" the indexes for each clause separately.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            linda.qin@mongodb.com Linda Qin
            Votes:
            1 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated: