partial index with expression with more than two `$in` values isn't used for some subsets

XMLWordPrintableJSON

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

      db.partial.createIndex({s:1},{partialFilterExpression:{x:{$in:[1, 2, 3]}}}) 

      This index will be used if the query on s includes x:{$in:[1, 2, 3]} or x:1 (or just 2 or just 3) but it's not considered if the clause is x:{$in:[1,2]} or any other subset of two out of three values. 

            Assignee:
            Unassigned
            Reporter:
            Asya Kamsky
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: