diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-01-05 12:16:42 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-01-08 08:58:57 -0500 |
commit | 176fad1a68fd9d0750a3aa4b33c2eb20be7d39ec (patch) | |
tree | a0a335b326d254b9da486e7af4050d46ed72fbf1 /src/mongo/db/commands/mr.cpp | |
parent | 4846585c6a7f09a18ac8c313ca7b0cee405ad29c (diff) | |
download | mongo-176fad1a68fd9d0750a3aa4b33c2eb20be7d39ec.tar.gz |
SERVER-22048 Record index access stats for aggregation and mapReduce
Diffstat (limited to 'src/mongo/db/commands/mr.cpp')
-rw-r--r-- | src/mongo/db/commands/mr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index d0066e7e066..27edf464286 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -1465,6 +1465,11 @@ public: if (config.limit && numInputs >= config.limit) break; } + + // Record the indexes used by the PlanExecutor. + PlanSummaryStats stats; + Explain::getSummaryStats(*exec, &stats); + coll->infoCache()->notifyOfQuery(txn, stats.indexesUsed); } pm.finished(); |