Consider index for range+equality style queries

XMLWordPrintableJSON

    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently you can hint to use an index for range+equlity matches but the index will not be considered otherwise. I would like to see it be considered like any other potential index.

      Example of desired behavior:

      db.coll.insert({a:twoDaysAgoDate, b:2})
      ... // millions of docs where a is less than 2 days ago
      db.coll.ensureIndex({a:1,b:1})
      db.coll.find({a:{$gt:oneDayAgoDate}, b:2}) //uses index, doesn't now.
      

              Assignee:
              Unassigned
              Reporter:
              Scott Hernandez (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: