-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.4.10, 2.6.3, 3.0.14, 3.2.10, 3.5.13
-
Component/s: Index Maintenance
-
Fully Compatible
-
ALL
-
v4.0, v3.6
-
Query 2019-03-11, Query 2019-03-25, Query 2019-04-08
-
(copied to CRM)
Had a compound index on
{ "lineitems.returnflag":1, "lineitems.linestatus":1 }
where lineitems is an array.
Did db.orders.distinct("lineitems.returnflag") which caused a collection scan.
Non-multikey correctly used the index.
- depends on
-
SERVER-12869 Index null values and missing values differently
- Backlog
- is duplicated by
-
SERVER-9640 Distinct command does not use covering multi-key indexes.
- Closed
-
SERVER-20989 Distinct not uses indexes
- Closed
-
SERVER-27060 Distinct not using the index on an indexed array field
- Closed