-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
When analyzing what sort can we provide by exploding an index scan, we return false (so no sorts) if we encounter a multi-key path in the suffix: https://github.com/mongodb/mongo/blob/995d977db8a8542e5ddb2d442882e42f439349c4/src/mongo/db/query/planner_analysis.cpp#L1089
This return false should be replaced with just break, because if there are regular paths before a multi-key path, we still can provide some kind of sort