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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • None
    • Query Integration
    • Fully Compatible
    • QI 2023-06-12, QI 2023-06-26

    Description

      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

      Attachments

        Activity

          People

            backlog-query-integration Backlog - Query Integration
            arun.banala@mongodb.com Arun Banala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: