summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/multi_plan.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-06-11 14:24:20 -0400
committerDavid Storch <david.storch@10gen.com>2014-06-27 09:56:04 -0400
commit1cc6be662ccd83b0341ef1f31f8f4ad30dc69451 (patch)
tree2cdd5f7e473d77685f6f7ca1c6735f75991089a7 /src/mongo/db/exec/multi_plan.h
parenta67bddc57c9b8a8d9d13ac30ebe74f9914b0c6d0 (diff)
downloadmongo-1cc6be662ccd83b0341ef1f31f8f4ad30dc69451.tar.gz
SERVER-14097 SERVER-14098 execution-level explain for .find() and .count()
The explain implementation for .find() and .count() is feature complete. To use the .find() implementation, set the enableNewExplain setParameter to true. Count operations are explained through the new explain command, e.g. db.runCommand({explain: {count: "coll", query: {foo: "bar"}}}).
Diffstat (limited to 'src/mongo/db/exec/multi_plan.h')
-rw-r--r--src/mongo/db/exec/multi_plan.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/mongo/db/exec/multi_plan.h b/src/mongo/db/exec/multi_plan.h
index fe25dcddfde..dadc38a833a 100644
--- a/src/mongo/db/exec/multi_plan.h
+++ b/src/mongo/db/exec/multi_plan.h
@@ -68,6 +68,10 @@ namespace mongo {
virtual void invalidate(const DiskLoc& dl, InvalidationType type);
+ virtual std::vector<PlanStage*> getChildren() const;
+
+ virtual StageType stageType() const { return STAGE_MULTI_PLAN; }
+
virtual PlanStageStats* getStats();
/** Takes ownership of QuerySolution and PlanStage. not of WorkingSet */
@@ -95,29 +99,20 @@ namespace mongo {
*/
bool hasBackupPlan() const;
- /**
- * Gathers execution stats for all losing plans.
- */
- vector<PlanStageStats*>* generateCandidateStats();
-
//
// Used by explain.
//
/**
- * Runs the winning plan into it hits EOF or returns DEAD, throwing out the results.
- * Execution stats are gathered in the process.
- *
- * You can call this after calling pickBestPlan(...). It expects that a winning plan
- * has already been selected.
+ * Gathers execution stats for all losing plans.
*/
- Status executeWinningPlan();
+ vector<PlanStageStats*> generateCandidateStats();
/**
* Runs the candidate plans until each has either hit EOF or returned DEAD. Results
* from the plans are thrown out, but execution stats are gathered.
*
- * You can call this after calling pickBestPlan(...). It expects that a winning plan
+ * You should call this after calling pickBestPlan(...). It expects that a winning plan
* has already been selected.
*/
Status executeAllPlans();