summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/explain.h
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2019-02-27 16:22:31 +0000
committerAnton Korshunov <anton.korshunov@mongodb.com>2019-04-03 12:19:22 +0100
commitd47bbc343af0b5bbde7b810f63e6b3404ea9e4d6 (patch)
treee2778eef1df27012e2540d3333ec95184d359fff /src/mongo/db/query/explain.h
parent6c2bd4b1be257ba7b9335e40c2af18ff25b7fcdd (diff)
downloadmongo-d47bbc343af0b5bbde7b810f63e6b3404ea9e4d6.tar.gz
SERVER-24860 Optimize away entire pipeline if it can be answered using a query
Diffstat (limited to 'src/mongo/db/query/explain.h')
-rw-r--r--src/mongo/db/query/explain.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/query/explain.h b/src/mongo/db/query/explain.h
index 678b3166345..8317fc50cfc 100644
--- a/src/mongo/db/query/explain.h
+++ b/src/mongo/db/query/explain.h
@@ -58,6 +58,8 @@ public:
*
* The explain information is generated with the level of detail specified by 'verbosity'.
*
+ * The 'extraInfo' parameter specifies additional information to include into the output.
+ *
* Does not take ownership of its arguments.
*
* The caller should hold at least an IS lock on the collection the that the query runs on,
@@ -69,6 +71,7 @@ public:
static void explainStages(PlanExecutor* exec,
const Collection* collection,
ExplainOptions::Verbosity verbosity,
+ BSONObj extraInfo,
BSONObjBuilder* out);
/**
* Adds "queryPlanner" and "executionStats" (if requested in verbosity) fields to 'out'. Unlike
@@ -78,6 +81,7 @@ public:
* - 'collection' is the relevant collection. The caller should hold at least an IS lock on the
* collection which the query ran on, even 'collection' is nullptr.
* - 'verbosity' is the verbosity level of the explain.
+ * - 'extraInfo' specifies additional information to include into the output.
* - 'executePlanStatus' is the status returned after executing the query (Status::OK if the
* query wasn't executed).
* - 'winningPlanTrialStats' is the stats of the winning plan during the trial period. May be
@@ -89,6 +93,7 @@ public:
ExplainOptions::Verbosity verbosity,
Status executePlanStatus,
PlanStageStats* winningPlanTrialStats,
+ BSONObj extraInfo,
BSONObjBuilder* out);
/**
@@ -198,10 +203,12 @@ private:
* - 'exec' is the stage tree for the operation being explained.
* - 'collection' is the collection used in the operation. The caller should hold an IS lock on
* the collection which the query is for, even if 'collection' is nullptr.
+ * - 'extraInfo' specifies additional information to include into the output.
* - 'out' is a builder for the explain output.
*/
static void generatePlannerInfo(PlanExecutor* exec,
const Collection* collection,
+ BSONObj extraInfo,
BSONObjBuilder* out);
/**