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

pushed filter on time-series has redundant predicates

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Query Planning
    • None
    • ALL

      for instance:

      > db.point_data.explain().aggregate([{$match: {"time":{$lt:ISODate("2016-01-01T00:00:00Z")}}}]) 

       

      "winningPlan" : 
      {    "stage" : "COLLSCAN",
           "filter" : { "$and" : [     
            { "_id" : {     "$lt" : ObjectId("5685c1800000000000000000") }     }, 
            { "_id" : {     "$lt" : ObjectId("5685c1800000000000000000") }     },  
            { "control.min.time" : {     "$_internalExprLt" : ISODate("2016-01-01T00:00:00Z") }     },     
            { "control.min.time" : {     "$_internalExprLt" : ISODate("2016-01-01T00:00:00Z") }     } ]    },
          "direction" : "forward"},

       

      The pushed filter is still valid, maybe not that performant and it is probably unintended behaviour 

            Assignee:
            hana.pearlman@mongodb.com Hana Pearlman
            Reporter:
            ruslan.abdulkhalikov@mongodb.com Ruslan Abdulkhalikov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: