diff options
author | David Storch <david.storch@10gen.com> | 2014-06-11 14:24:20 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-06-27 09:56:04 -0400 |
commit | 1cc6be662ccd83b0341ef1f31f8f4ad30dc69451 (patch) | |
tree | 2cdd5f7e473d77685f6f7ca1c6735f75991089a7 /src/mongo/db/exec/or.cpp | |
parent | a67bddc57c9b8a8d9d13ac30ebe74f9914b0c6d0 (diff) | |
download | mongo-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/or.cpp')
-rw-r--r-- | src/mongo/db/exec/or.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/exec/or.cpp b/src/mongo/db/exec/or.cpp index 9266c6fec10..e9832567e40 100644 --- a/src/mongo/db/exec/or.cpp +++ b/src/mongo/db/exec/or.cpp @@ -52,6 +52,9 @@ namespace mongo { PlanStage::StageState OrStage::work(WorkingSetID* out) { ++_commonStats.works; + // Adds the amount of time taken by work() to executionTimeMillis. + ScopedTimer timer(&_commonStats.executionTimeMillis); + if (isEOF()) { return PlanStage::IS_EOF; } if (0 == _specificStats.matchTested.size()) { @@ -168,6 +171,10 @@ namespace mongo { } } + vector<PlanStage*> OrStage::getChildren() const { + return _children; + } + PlanStageStats* OrStage::getStats() { _commonStats.isEOF = isEOF(); |