[SERVER-79699] Support wholeBucketFilter in the UnpackBucketNode stage Created: 04/Aug/23  Updated: 27/Nov/23  Resolved: 21/Nov/23

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

Type: Task Priority: Major - P3
Reporter: Yoon Soo Kim Assignee: Backlog - Query Execution
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-62058 SBE for time-series will need $_inter... Closed
depends on SERVER-79697 Add a QuerySolutionNode to lower $_in... Closed
Duplicate
is duplicated by SERVER-79062 Either block from lowering to SBE or ... Closed
Related
related to SERVER-83507 Complete TODO listed in SERVER-79699 Closed
is related to SERVER-62058 SBE for time-series will need $_inter... Closed
Assigned Teams:
Query Execution
Sprint: QI 2023-09-04, QI 2023-09-18, QI 2023-10-02, QI 2023-10-16
Participants:

 Comments   
Comment by Githook User [ 27/Nov/23 ]

Author:

{'name': 'Parker Felix', 'email': 'parker.felix@mongodb.com', 'username': 'parker-felix'}

Message: SERVER-83507 Remove TODOs referencing SERVER-79699.
Branch: master
https://github.com/mongodb/mongo/commit/97afefe815cc546f3cb941741bc59ab8805b7422

Comment by Ian Boros [ 21/Nov/23 ]

Closing as won't do, as SERVER-81597 makes this unnecessary.

Comment by Irina Yatsenko (Inactive) [ 09/Oct/23 ]

I ran the following query against the tsbs_query dataset as a Genny workload:

[
  {"$match": {"time":{"$gte": {^Date: "2016-01-01T00:00:00Z"},"$lt": {^Date: "2016-01-15T00:00:00Z"}},}}, # 2 weeks, hits 94650 buckets
  {"$group":{
    "_id":{"$dateTrunc":{"date":"$time","unit":"hour"}}, # 14*24
    "max_usage_user":{"$max":"$usage_user"}
  }},
  {"$sort":{"_id":1}}
]

When I disable the whole bucket filter optimization in classic, it shows ~30% regression, so the workload is definitely hitting the optimization.
However, in SBE without the optimization it yields ~15% improvement over classic with the optimization.

Comment by Yoon Soo Kim [ 22/Aug/23 ]

Due to SERVER-62058, we can't do this. Otherwise, it may produce non-matching results. The current behavior is incorrect for the tight filter (or wholeBucketFilter) because if the tight filter evaluates to true, the eventFilter will not be evaluated at all and it will produce non-matching results.

Generated at Thu Feb 08 06:41:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.