summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/multi_plan.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2022-01-27 14:53:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-27 15:53:17 +0000
commitf27f088ecf14825a2ae9cedb2c13093287ded84a (patch)
treeb38f12dcf2e9ad7a5c9e2a0b8546ff0cd69e6f2d /src/mongo/db/exec/multi_plan.cpp
parent2891359b151883d41ceb3b79d769867462b79e89 (diff)
downloadmongo-f27f088ecf14825a2ae9cedb2c13093287ded84a.tar.gz
SERVER-62981 Make SBE multi-planner trial period length independent of collection size
This patch changes the 'internalQueryPlanEvaluationCollFraction' knob to apply only to the classic engine. It introduces a separate knob, 'internalQueryPlanEvaluationCollFractionSbe', which applies only to the SBE engine. The SBE knob has a default of 0, while the classic engine retains its default of 0.3. This ensures that by default, no candidate plan will ever do more than 10,000 storage reads during SBE multi-planning.
Diffstat (limited to 'src/mongo/db/exec/multi_plan.cpp')
-rw-r--r--src/mongo/db/exec/multi_plan.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp
index 7dfb6ffc5d7..892d05cb5ca 100644
--- a/src/mongo/db/exec/multi_plan.cpp
+++ b/src/mongo/db/exec/multi_plan.cpp
@@ -163,7 +163,8 @@ Status MultiPlanStage::pickBestPlan(PlanYieldPolicy* yieldPolicy) {
// make sense.
auto optTimer = getOptTimer();
- size_t numWorks = trial_period::getTrialPeriodMaxWorks(opCtx(), collection());
+ size_t numWorks = trial_period::getTrialPeriodMaxWorks(
+ opCtx(), collection(), internalQueryPlanEvaluationCollFraction.load());
size_t numResults = trial_period::getTrialPeriodNumToReturn(*_query);
try {