summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQingyang Chen <qingyang.chen@10gen.com>2015-06-16 14:46:55 -0400
committerQingyang Chen <qingyang.chen@10gen.com>2015-06-17 17:42:27 -0400
commitdd4d87a3a29c940aab70c54edee6223a275f531f (patch)
tree8246a52de06796cd0e0f5d4be498b66b277e9255
parentfce2d9b135b3f709c2e4219f9036b7985752b2b9 (diff)
downloadmongo-dd4d87a3a29c940aab70c54edee6223a275f531f.tar.gz
SERVER-15217 remove NonCoveredIxisectFetchesLess plan ranking test
-rw-r--r--src/mongo/dbtests/plan_ranking.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/mongo/dbtests/plan_ranking.cpp b/src/mongo/dbtests/plan_ranking.cpp
index 6124d4417b6..d1b3a7d24f4 100644
--- a/src/mongo/dbtests/plan_ranking.cpp
+++ b/src/mongo/dbtests/plan_ranking.cpp
@@ -590,58 +590,6 @@ namespace PlanRankingTests {
};
/**
- * Index intersection solutions may require fewer fetches even if it does not make the
- * query covered. The ixisect plan will scan as many index keys as the union of the two
- * single index plans, but only needs to retrieve full documents for the intersection
- * of the two plans---this could mean fewer fetches!
- */
- class PlanRankingNonCoveredIxisectFetchesLess : public PlanRankingTestBase {
- public:
- void run() {
- // Simulate needing lots of FETCH's.
- turnOnAlwaysFetch();
-
- // Set up data so that the following conditions hold:
- // 1) Documents matching {a: 1} are of high cardinality.
- // 2) Documents matching {b: 1} are of high cardinality.
- // 3) Documents matching {a: 1, b: 1} are of low cardinality---
- // the intersection is small.
- // 4) At least one of the documents in the intersection is
- // returned during the trial period.
- insert(BSON("a" << 1 << "b" << 1));
- for (int i = 0; i < N/2; ++i) {
- insert(BSON("a" << 1 << "b" << 2));
- }
- for (int i = 0; i < N/2; ++i) {
- insert(BSON("a" << 2 << "b" << 1));
- }
-
- // Add indices on 'a' and 'b'.
- addIndex(BSON("a" << 1));
- addIndex(BSON("b" << 1));
-
- // Neither the predicate on 'b' nor the predicate on 'a' is
- // very selective: both retrieve about half the documents.
- // However, the intersection is very small, which makes
- // the intersection plan desirable.
- CanonicalQuery* cq;
- ASSERT(CanonicalQuery::canonicalize(ns,
- fromjson("{a: 1, b: 1}"),
- &cq).isOK());
- ASSERT(NULL != cq);
-
- QuerySolution* soln = pickBestPlan(cq);
- ASSERT(QueryPlannerTestLib::solutionMatches(
- "{fetch: {filter: null, node: {andSorted: {nodes: ["
- "{ixscan: {filter: null, pattern: {a:1}}},"
- "{ixscan: {filter: null, pattern: {b:1}}}]}}}}",
- soln->root.get()));
-
- turnOffAlwaysFetch();
- }
- };
-
- /**
* If the intersection is small, an AND_SORTED plan may be able to
* hit EOF before the single index plans.
*/
@@ -852,7 +800,6 @@ namespace PlanRankingTests {
add<PlanRankingCollscan>();
add<PlanRankingIxisectCovered>();
add<PlanRankingIxisectNonCovered>();
- add<PlanRankingNonCoveredIxisectFetchesLess>();
add<PlanRankingIxisectHitsEOFFirst>();
add<PlanRankingChooseBetweenIxisectPlans>();
add<PlanRankingAvoidBlockingSort>();