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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.7
    • Querying
    • None
    • Query Optimization

    Description

      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.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            linda.qin@mongodb.com Linda Qin
            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

            Dates

              Created:
              Updated: