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

Optimize time-series sorting on multikey index

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration

      When you sort by time or (meta, time) on a time-series collection, we're currently not attempting to optimize any case where the index is multikey.

      Multikey indexes have more than one index entry per document, and scanning the index produces each document once, the first time it encounters one of its index entries. This means scanning a subset of the index can produce documents in a different order than scanning the whole index.

      For time-series (when sorting by time or (meta, time), some cases we probably could improve are:

      • When the multikey scan has no bounds.
      • When the only multikey fields are irrelevant trailing fields.

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: