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

Extend bounded sort optimization for timeseries for equality predicates on multi key indexes

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

      In this line we restrict the bounded sort optimization for time-series on all indexes that are multikey. However this is too restrictive. Based on this comment, we should be able to extend this optimization on equality predicates on an index, even if it's multikey. This improvement will extend the optimization to queries like this:

      // Secondary index for the time-series collection:
      { "meta.array": 1, t: -1 }
      
      // Run a find query:
      coll.find({ "meta.array": "value" }).sort({ t: -1 })
      
      // This should result in an IXSCAN with $_internalBoundedSort

            Assignee:
            backlog-query-integration [DO NOT USE] Backlog - Query Integration
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: