diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-02-27 16:22:31 +0000 |
---|---|---|
committer | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-04-03 12:19:22 +0100 |
commit | d47bbc343af0b5bbde7b810f63e6b3404ea9e4d6 (patch) | |
tree | e2778eef1df27012e2540d3333ec95184d359fff /jstests/core/index_partial_read_ops.js | |
parent | 6c2bd4b1be257ba7b9335e40c2af18ff25b7fcdd (diff) | |
download | mongo-d47bbc343af0b5bbde7b810f63e6b3404ea9e4d6.tar.gz |
SERVER-24860 Optimize away entire pipeline if it can be answered using a query
Diffstat (limited to 'jstests/core/index_partial_read_ops.js')
-rw-r--r-- | jstests/core/index_partial_read_ops.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/core/index_partial_read_ops.js b/jstests/core/index_partial_read_ops.js index f06ee85c621..27fdb430fba 100644 --- a/jstests/core/index_partial_read_ops.js +++ b/jstests/core/index_partial_read_ops.js @@ -57,11 +57,11 @@ load("jstests/libs/analyze_plan.js"); // // Aggregate operation that should use index. - explain = coll.aggregate([{$match: {x: {$gt: 1}, a: 1}}], {explain: true}).stages[0].$cursor; + explain = coll.aggregate([{$match: {x: {$gt: 1}, a: 1}}], {explain: true}); assert(isIxscan(db, explain.queryPlanner.winningPlan)); // Aggregate operation that should not use index. - explain = coll.aggregate([{$match: {x: {$gt: 1}, a: 2}}], {explain: true}).stages[0].$cursor; + explain = coll.aggregate([{$match: {x: {$gt: 1}, a: 2}}], {explain: true}); assert(isCollscan(db, explain.queryPlanner.winningPlan)); // |