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

Push $limit stage into $sort pushdown for time-series collection

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible

    Description

      Add time-series query rewrite to push $limit into $sort (for sort on the metadata field) so that we don't sort buckets that are not necessary

      It is safe to assume that every bucket has at least one measurement. We should rewrite [\{$_unpack}, \{$sort}, \{$limit: x}] pipeline as [\{$sort(with limit)}, \{$_unpack}, \{$limit: x}]

      Attachments

        Activity

          People

            alice.li@mongodb.com Alice Li (Inactive)
            alice.li@mongodb.com Alice Li (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: