[SERVER-82899] Investigate SBE bucket level filters being slower than classic Created: 07/Nov/23  Updated: 06/Dec/23  Resolved: 29/Nov/23

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

Type: Task Priority: Major - P3
Reporter: Parker Felix Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-82570 Bucket-level filters in time-series a... Closed
Problem/Incident
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 35

 Description   

The following agg pipeline on the TSBS dataset is ~30% slower in SBE with block processing than it is in classic.

[
  {
    $match:
      {
        $and:
          [
            { usage_user: { $gte: 0, $lt: 20 } },
            { usage_system: { $gte: 20, $lt: 35 } },
            { usage_idle: { $gte: 35, $lt: 50 } },
            { usage_nice: { $gte: 50, $lt: 65 } },
            { usage_iowait : { $gte: 65, $lt: 80 } },
            { usage_steal: { $gte: 80, $lt: 90 } },
            { usage_guest: { $gte: 90, $lt: 100 } },
          ],
      },
  },
  { $count: "count" }
]

This should only be investigated once the linked issue is closed, since SBE block processing will currently unpack every bucket which makes it orders of magnitude slower than classic.



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

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'borosaurus'}

Message: SERVER-82899 Improve perf of InternalExpr* predicates in SBE
Branch: master
https://github.com/mongodb/mongo/commit/04791dcb11c558e751bece67eb47ec997b11fa9e

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