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

$_internalUnpackBucket to return single min/max doc

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Query Planning
    • Labels:
      None
    • Query Optimization

      This ticket is optional for PM-2330. 

      SERVER-9507 lets us avoid a full index scan when $group and $first/$last are used together.  PM-2330 extends this optimization to timeseries collections, however it still unpacks the entire bucket containing the first/last data (with $internalUnpackBucket) and then uses a $sort and $last.

      It would be more efficient to have a bucket access operator that directly returned the document for the min/max timestamp.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            ruslan.abdulkhalikov@mongodb.com Ruslan Abdulkhalikov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: