diff options
Diffstat (limited to 'src/mongo/db/query/plan_explainer_sbe.cpp')
| -rw-r--r-- | src/mongo/db/query/plan_explainer_sbe.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/query/plan_explainer_sbe.cpp b/src/mongo/db/query/plan_explainer_sbe.cpp index 25ef5435572..2f8f5b43b08 100644 --- a/src/mongo/db/query/plan_explainer_sbe.cpp +++ b/src/mongo/db/query/plan_explainer_sbe.cpp @@ -371,10 +371,9 @@ void PlanExplainerSBE::getSummaryStats(PlanSummaryStats* statsOut) const { // Use the pre-computed summary stats instead of traversing the QuerySolution tree. const auto& indexesUsed = _debugInfo->mainStats.indexesUsed; - statsOut->indexesUsed.clear(); statsOut->indexesUsed.insert(indexesUsed.begin(), indexesUsed.end()); - statsOut->collectionScans = _debugInfo->mainStats.collectionScans; - statsOut->collectionScansNonTailable = _debugInfo->mainStats.collectionScansNonTailable; + statsOut->collectionScans += _debugInfo->mainStats.collectionScans; + statsOut->collectionScansNonTailable += _debugInfo->mainStats.collectionScansNonTailable; } void PlanExplainerSBE::getSecondarySummaryStats(std::string secondaryColl, |
