mirror of https://github.com/mongodb/mongo
Merge ba397817bb into 627ca12e79
This commit is contained in:
commit
8884a0f922
|
|
@ -1149,6 +1149,11 @@ bool QueryPlannerAnalysis::explodeForSort(const CanonicalQuery& query,
|
|||
if (!isOilExplodable(oil, iet)) {
|
||||
break;
|
||||
}
|
||||
// We need not explode the fields in the desired sort order
|
||||
auto elem = *kpIt;
|
||||
if (elem.fieldNameStringData() == desiredSort.begin()->fieldNameStringData()) {
|
||||
break;
|
||||
}
|
||||
numScans *= oil.intervals.size();
|
||||
kpIt.next();
|
||||
++boundsIdx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue