-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Server
-
Labels:
SERVER-3173, fixed in development release 3.5.2, allowed mongod's query system to produce covered plans in some cases for multikey indexes. Previously existing documentation mentions that covering is not possible for multikey indexes:
An index cannot cover a query if... any of the indexed fields in any of the documents in the collection includes an array. If an indexed field is an array, the index becomes a multi-key index and cannot support a covered query.
This is no longer true. The fix for SERVER-3173 takes advantage of improvements added under SERVER-15086 in which the server tracks metadata about which indexed fields are multikey. This metadata is available for indexes built on a 3.4 or newer version using any storage engine other than MMAPv1. When this info is available, the planner can now generate covered plans over the non-array fields of a multikey index.
- documents
-
SERVER-3173 Planner should use path-level multikey info to generate covered plans when possible
- Closed