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

Map predicates on max time to a portion of _id

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.9.0
    • Querying
    • Fully Compatible
    • Query Optimization 2021-03-22, Query Optimization 2021-04-05, Query Optimization 2021-04-19

    Description

      As part of the time-series schema, min time is embedded into _id. We can add the max bucket range to this to get an overestimate for max time. In addition to using the control.max.time field, we should map max time predicates to predicates on time to the min time portion of _id plus the bucket range. The 'plus' can be realized by subtracting from the user-provided predicate value in the query but we should guard against underflow. This should lead to guaranteed index utilization. This should be done inside $unpackBucket's doOptimizeAt() for $eq, $gt, $lt, $gte, $lte only.

      Attachments

        Issue Links

          Activity

            People

              jacob.evans@mongodb.com Jacob Evans
              jacob.evans@mongodb.com Jacob Evans
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: