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

Map agg comparison predicates on time-series collections to bucket-level fields

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Query Optimization 2021-07-26, Query Optimization 2021-08-09, QO 2021-09-20, QO 2021-10-04, QO 2021-10-18, QO 2021-11-01, QO 2021-11-15, QO 2021-11-29, QO 2021-12-13, QO 2021-12-27, QO 2022-01-10, QO 2022-01-24, QO 2021-08-23

      As part of the time-series query rewrites, MatchExpression predicates like {meta.host: {$eq: "host_0"}} are mapped onto bucket-level fields and pushed in front of the _internalUnpackBucket stage so they can potentially utilize an index.

      We should do something similar to aggregation comparison predicates like {$expr: {$eq: ["$meta.host", "host_0]}} which currently do not participate in this mapping optimization and thus require all the buckets to be unpacked.

            Assignee:
            katherine.wu@mongodb.com Katherine Wu (Inactive)
            Reporter:
            katherine.wu@mongodb.com Katherine Wu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: