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

Allow compound indexes using single elements from multiple arrays

    XMLWordPrintableJSON

Details

    • Query Optimization

    Description

      MongoDB currently disallows compound indexes whose components are single array elements selected by position from multiple arrays.

      However, MongoDB does allow compound indexes whose components are single array elements selected by position from a single array. Furthermore, the resulting index is not multiKey.

      Given that neither of these indexes should be multiKey, the check for multiple arrays at https://github.com/mongodb/mongo/blob/r2.4.8/src/mongo/db/indexkey.cpp#L232 may be a little too restrictive.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            norman.graham@mongodb.com Norman Graham
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: