[SERVER-55878] pushed filter on time-series has redundant predicates Created: 07/Apr/21  Updated: 20/Apr/21  Resolved: 20/Apr/21

Status: Closed
Project: Core Server
Component/s: Query Planning
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Ruslan Abdulkhalikov (Inactive) Assignee: Hana Pearlman
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-54766 Ensure that multiple $unpackBucket re... Closed
Duplicate
is duplicated by SERVER-54894 Ensure $_internalUnpackBucket's doOpt... Closed
Related
is related to SERVER-54894 Ensure $_internalUnpackBucket's doOpt... Closed
Operating System: ALL
Participants:

 Description   

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 



 Comments   
Comment by Hana Pearlman [ 20/Apr/21 ]

The changes in SERVER-54766 resolved both this ticket and SERVER-54894.

Generated at Thu Feb 08 05:37:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.