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

XMLWordPrintableJSON

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

      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:
              [DO NOT USE] Backlog - Query Integration
              Reporter:
              Arun Banala
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: