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

Push $limit stage into $sort pushdown 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
    • Fully Compatible

      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}]

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

              Created:
              Updated:
              Resolved: