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

Push $limit stage into the PlanStage for time-series collection

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Integration
    • Fully Compatible
    • QI 2023-06-12, QI 2023-06-26

      Add time-series query rewrite to push $limit into the PlanStage so that we don't fetch buckets that are not necessary

      It is safe to assume that every bucket has at least one measurement. So we can rewrite an [{$_unpack}, {$limit: x}] pipeline as [{$limit: x}, {$_unpack}, {$limit: x}] . Similarly we can push the limit values inside $sort when we do $sort pushdown

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            arun.banala@mongodb.com Arun Banala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: