summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/count_scan.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-02-18 18:39:39 -0500
committerDavid Storch <david.storch@10gen.com>2016-02-22 16:12:45 -0500
commitd8ee6353312a5639ae56454be62066d602eff818 (patch)
tree294c2fb7091a8c3d41afa9544bbb137ab0ff393b /src/mongo/db/exec/count_scan.cpp
parent02fd42496cb871062d27faf0e419d514fdbb1a9b (diff)
downloadmongo-d8ee6353312a5639ae56454be62066d602eff818.tar.gz
SERVER-22407 make COUNT_SCAN return RID_AND_OBJ instead of OWNED_OBJ
Fixes most of a 7% perf regression for COUNT_SCAN plans.
Diffstat (limited to 'src/mongo/db/exec/count_scan.cpp')
-rw-r--r--src/mongo/db/exec/count_scan.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/db/exec/count_scan.cpp b/src/mongo/db/exec/count_scan.cpp
index e65e7977c55..e460854542a 100644
--- a/src/mongo/db/exec/count_scan.cpp
+++ b/src/mongo/db/exec/count_scan.cpp
@@ -106,9 +106,7 @@ PlanStage::StageState CountScan::doWork(WorkingSetID* out) {
}
WorkingSetID id = _workingSet->allocate();
- WorkingSetMember* member = _workingSet->get(id);
- member->obj = Snapshotted<BSONObj>(SnapshotId(), BSONObj().getOwned());
- member->transitionToOwnedObj();
+ _workingSet->transitionToRecordIdAndObj(id);
*out = id;
return PlanStage::ADVANCED;
}