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

Extend index multikeyness metadata for positional paths

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

      The fix for SERVER-57588 is to check if an $elemMatch is on a field which is a positional path component of an indexed path. If that is the case, the index cannot be used for $elemMatch because key boundaries cannot be formed. The problem with that patch is that it is too crude, and may prevent index use even when the parent path doesn't contain arrays. In this case the positional path is not an array index, it has the meaning of a regular path, and the index can still be used.

       

      In order to refine that patch, and make multikeyness index metadata more complete, it is necessary to simplify the metadata and collect multikey information even when the index path contains positional components.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            timour.katchaounov@mongodb.com Timour Katchaounov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: