summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilena Ivanova <milena.ivanova@mongodb.com>2023-02-08 10:56:38 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-08 12:17:43 +0000
commit709346fbd32a726d1a13fde1f2246fc3932652fb (patch)
tree264bb2af499be58853bd7fe69c97e7c33d8e0f41
parent2e6ee8f329d2cf122856d8ee789ff82a5e75a686 (diff)
downloadmongo-709346fbd32a726d1a13fde1f2246fc3932652fb.tar.gz
SERVER-73432 Extend CE accuracy testing for arrays
-rw-r--r--jstests/cqf/analyze/array_histogram.js6
-rw-r--r--jstests/libs/ce_stats_utils.js28
-rw-r--r--jstests/query_golden/expected_output/ce_accuracy1836
-rw-r--r--jstests/query_golden/libs/compute_errors.js11
-rw-r--r--jstests/query_golden/libs/generate_queries.js89
-rw-r--r--jstests/query_golden/libs/run_queries_ce.js5
-rw-r--r--src/mongo/db/query/ce/histogram_estimator_test.cpp30
-rw-r--r--src/mongo/db/query/ce/histogram_predicate_estimation.cpp4
8 files changed, 1253 insertions, 756 deletions
diff --git a/jstests/cqf/analyze/array_histogram.js b/jstests/cqf/analyze/array_histogram.js
index 74de4e51e30..e242277c500 100644
--- a/jstests/cqf/analyze/array_histogram.js
+++ b/jstests/cqf/analyze/array_histogram.js
@@ -232,7 +232,7 @@ runHistogramsTest(function verifyArrayHistograms() {
],
// In this case, CE is only seeing one scalar interval. Because we don't get a PathArr
// interval, we estimate this to include scalars.
- ce: 4,
+ ce: 3,
hint: idx
});
verifyCEForMatch({coll, predicate: {a: {$elemMatch: {$lt: "array"}}}, expected: [], hint: idx});
@@ -256,7 +256,7 @@ runHistogramsTest(function verifyArrayHistograms() {
],
// In this case, CE is only seeing one scalar interval. Because we don't get a PathArr
// interval, we estimate this to include scalars.
- ce: 4,
+ ce: 3,
hint: idx
});
verifyCEForMatch({
@@ -279,7 +279,7 @@ runHistogramsTest(function verifyArrayHistograms() {
],
// In this case, CE is only seeing one scalar interval. Because we don't get a PathArr
// interval, we estimate this to include scalars.
- ce: 4,
+ ce: 3,
hint: idx
});
});
diff --git a/jstests/libs/ce_stats_utils.js b/jstests/libs/ce_stats_utils.js
index f13bc504b47..ac147589935 100644
--- a/jstests/libs/ce_stats_utils.js
+++ b/jstests/libs/ce_stats_utils.js
@@ -154,3 +154,31 @@ function analyzeFields(db, coll, fields) {
assert.commandWorked(db.runCommand({analyze: coll.getName(), key: field}));
}
}
+/**
+ * Given a scalar histogram document print it combining bounds with the corresponding buckets.
+ * hist = { buckets: [{boundaryCount: 1, rangeCount: 0, ...}], bounds: [100, 500]}
+ */
+function printScalarHistogram(hist) {
+ assert.eq(hist.buckets.length, hist.bounds.length);
+ let i = 0;
+ while (i < hist.buckets.length) {
+ print(`BucketId: ${i}, ${hist.bounds[i]}, ${tojsononeline(hist.buckets[i])}\n`);
+ i++;
+ }
+}
+
+function printHistogram(hist) {
+ jsTestLog(`Histogram on field: ${hist._id}`);
+ print("Scalar Histogram:\n");
+ printScalarHistogram(hist.statistics.scalarHistogram);
+
+ if (hist.statistics.hasOwnProperty("arrayStatistics")) {
+ print("Array statistics:\n");
+ print("Unique Histogram:\n");
+ printScalarHistogram(hist.statistics.arrayStatistics.uniqueHistogram);
+ print("Min Histogram:\n");
+ printScalarHistogram(hist.statistics.arrayStatistics.minHistogram);
+ print("Max Histogram:\n");
+ printScalarHistogram(hist.statistics.arrayStatistics.maxHistogram);
+ }
+}
diff --git a/jstests/query_golden/expected_output/ce_accuracy b/jstests/query_golden/expected_output/ce_accuracy
index 965bf779315..5e35b7c1e10 100644
--- a/jstests/query_golden/expected_output/ce_accuracy
+++ b/jstests/query_golden/expected_output/ce_accuracy
@@ -25,6 +25,7 @@ Running CE accuracy test for collection ce_data_20 of 20 documents.
[jsTest] Selected query values: {
[jsTest] "a" : {
[jsTest] "values" : [
+[jsTest] 9,
[jsTest] 10,
[jsTest] 12,
[jsTest] 17,
@@ -32,30 +33,33 @@ Running CE accuracy test for collection ce_data_20 of 20 documents.
[jsTest] 27,
[jsTest] 32,
[jsTest] 33,
-[jsTest] 34
+[jsTest] 34,
+[jsTest] 35
[jsTest] ],
[jsTest] "min" : 10,
[jsTest] "max" : 34
[jsTest] },
[jsTest] "b" : {
[jsTest] "values" : [
+[jsTest] "",
[jsTest] "a",
[jsTest] "c",
[jsTest] "opqr",
[jsTest] "stu",
[jsTest] "wxyz",
[jsTest] "yz",
-[jsTest] "yzab"
+[jsTest] "yzab",
+[jsTest] "yzbb"
[jsTest] ],
[jsTest] "min" : "a",
[jsTest] "max" : "yzab"
[jsTest] },
[jsTest] "c" : {
[jsTest] "values" : [
+[jsTest] 0,
[jsTest] 1,
[jsTest] 2,
[jsTest] 3,
-[jsTest] 4,
[jsTest] 5,
[jsTest] 9,
[jsTest] 15,
@@ -63,13 +67,15 @@ Running CE accuracy test for collection ce_data_20 of 20 documents.
[jsTest] 17,
[jsTest] 18,
[jsTest] 19,
-[jsTest] 20
+[jsTest] 20,
+[jsTest] 21
[jsTest] ],
[jsTest] "min" : 1,
[jsTest] "max" : 20
[jsTest] },
[jsTest] "mixed" : {
[jsTest] "values" : [
+[jsTest] -1,
[jsTest] 0,
[jsTest] 22,
[jsTest] 77,
@@ -77,7 +83,8 @@ Running CE accuracy test for collection ce_data_20 of 20 documents.
[jsTest] "gh",
[jsTest] "mno",
[jsTest] "u",
-[jsTest] "yzab"
+[jsTest] "yzab",
+[jsTest] "yzbb"
[jsTest] ],
[jsTest] "min" : 0,
[jsTest] "max" : "yzab"
@@ -85,10 +92,23 @@ Running CE accuracy test for collection ce_data_20 of 20 documents.
[jsTest] }
[jsTest] ----
+Running 207 queries over 4 fields.
[jsTest] ----
-[jsTest] Query 0: [ { "$match" : { "a" : { "$eq" : 10 } } } ]
+[jsTest] Query 0: [ { "$match" : { "a" : { "$eq" : 9 } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+heuristicIdx: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 1: [ { "$match" : { "a" : { "$eq" : 10 } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -100,19 +120,55 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 1: [ { "$match" : { "a" : { "$eq" : 12 } } } ]
+[jsTest] Query 2: [ { "$match" : { "a" : { "$lt" : 10 } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 3: [ { "$match" : { "a" : { "$lte" : 10 } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
-heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
+heuristic: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 2: [ { "$match" : { "a" : { "$lt" : 12 } } } ]
+[jsTest] Query 4: [ { "$match" : { "a" : { "$gt" : 10 } } } ]
+[jsTest] ----
+
+Actual cardinality: 19
+Cardinality estimates:
+heuristic: 9 AbsError: -10, RelError: -0.53, SelError: -50%
+heuristicIdx: 9 AbsError: -10, RelError: -0.53, SelError: -50%
+histogram: 19 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 19 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 5: [ { "$match" : { "a" : { "$gte" : 10 } } } ]
+[jsTest] ----
+
+Actual cardinality: 20
+Cardinality estimates:
+heuristic: 9 AbsError: -11, RelError: -0.55, SelError: -55%
+heuristicIdx: 9 AbsError: -11, RelError: -0.55, SelError: -55%
+histogram: 20 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 20 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 6: [ { "$match" : { "a" : { "$lt" : 12 } } } ]
[jsTest] ----
Actual cardinality: 2
@@ -124,67 +180,67 @@ histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 3: [ { "$match" : { "a" : { "$lte" : 12 } } } ]
+[jsTest] Query 7: [ { "$match" : { "a" : { "$lte" : 17 } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 8
Cardinality estimates:
-heuristic: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -1.4, RelError: -0.18, SelError: -7%
+heuristicIdx: 6.6 AbsError: -1.4, RelError: -0.18, SelError: -7%
+histogram: 8 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 8 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 4: [ { "$match" : { "a" : { "$gt" : 12 } } } ]
+[jsTest] Query 8: [ { "$match" : { "a" : { "$gt" : 25 } } } ]
[jsTest] ----
-Actual cardinality: 17
+Actual cardinality: 9
Cardinality estimates:
-heuristic: 9 AbsError: -8, RelError: -0.47, SelError: -40%
-heuristicIdx: 9 AbsError: -8, RelError: -0.47, SelError: -40%
-histogram: 17 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 17 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 0, RelError: 0, SelError: 0%
+heuristicIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogram: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 5: [ { "$match" : { "a" : { "$gte" : 12 } } } ]
+[jsTest] Query 9: [ { "$match" : { "a" : { "$eq" : 27 } } } ]
[jsTest] ----
-Actual cardinality: 18
+Actual cardinality: 1
Cardinality estimates:
-heuristic: 9 AbsError: -9, RelError: -0.5, SelError: -45%
-heuristicIdx: 9 AbsError: -9, RelError: -0.5, SelError: -45%
-histogram: 18 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 18 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
+heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
+histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 6: [ { "$match" : { "a" : { "$lt" : 17 } } } ]
+[jsTest] Query 10: [ { "$match" : { "a" : { "$lt" : 27 } } } ]
[jsTest] ----
-Actual cardinality: 7
+Actual cardinality: 12
Cardinality estimates:
-heuristic: 6.6 AbsError: -0.4, RelError: -0.06, SelError: -2%
-heuristicIdx: 6.6 AbsError: -0.4, RelError: -0.06, SelError: -2%
-histogram: 7 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 7 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -5.4, RelError: -0.45, SelError: -27%
+heuristicIdx: 6.6 AbsError: -5.4, RelError: -0.45, SelError: -27%
+histogram: 12 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 12 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 7: [ { "$match" : { "a" : { "$lte" : 25 } } } ]
+[jsTest] Query 11: [ { "$match" : { "a" : { "$lte" : 27 } } } ]
[jsTest] ----
-Actual cardinality: 11
+Actual cardinality: 13
Cardinality estimates:
-heuristic: 6.6 AbsError: -4.4, RelError: -0.4, SelError: -22%
-heuristicIdx: 6.6 AbsError: -4.4, RelError: -0.4, SelError: -22%
-histogram: 11 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 11 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -6.4, RelError: -0.49, SelError: -32%
+heuristicIdx: 6.6 AbsError: -6.4, RelError: -0.49, SelError: -32%
+histogram: 13 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 13 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 8: [ { "$match" : { "a" : { "$gt" : 27 } } } ]
+[jsTest] Query 12: [ { "$match" : { "a" : { "$gt" : 27 } } } ]
[jsTest] ----
Actual cardinality: 7
@@ -196,7 +252,31 @@ histogramIdx: 7 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 9: [ { "$match" : { "a" : { "$eq" : 32 } } } ]
+[jsTest] Query 13: [ { "$match" : { "a" : { "$gte" : 27 } } } ]
+[jsTest] ----
+
+Actual cardinality: 8
+Cardinality estimates:
+heuristic: 9 AbsError: 1, RelError: 0.13, SelError: 5%
+heuristicIdx: 9 AbsError: 1, RelError: 0.13, SelError: 5%
+histogram: 8 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 8 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 14: [ { "$match" : { "a" : { "$gte" : 32 } } } ]
+[jsTest] ----
+
+Actual cardinality: 3
+Cardinality estimates:
+heuristic: 9 AbsError: 6, RelError: 2, SelError: 30%
+heuristicIdx: 9 AbsError: 6, RelError: 2, SelError: 30%
+histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 15: [ { "$match" : { "a" : { "$eq" : 33 } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -208,115 +288,115 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 10: [ { "$match" : { "a" : { "$lt" : 32 } } } ]
+[jsTest] Query 16: [ { "$match" : { "a" : { "$lt" : 34 } } } ]
[jsTest] ----
-Actual cardinality: 17
+Actual cardinality: 19
Cardinality estimates:
-heuristic: 6.6 AbsError: -10.4, RelError: -0.61, SelError: -52%
-heuristicIdx: 6.6 AbsError: -10.4, RelError: -0.61, SelError: -52%
-histogram: 17 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 17 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -12.4, RelError: -0.65, SelError: -62%
+heuristicIdx: 6.6 AbsError: -12.4, RelError: -0.65, SelError: -62%
+histogram: 19 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 19 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 11: [ { "$match" : { "a" : { "$lte" : 32 } } } ]
+[jsTest] Query 17: [ { "$match" : { "a" : { "$eq" : 35 } } } ]
[jsTest] ----
-Actual cardinality: 18
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 6.6 AbsError: -11.4, RelError: -0.63, SelError: -57%
-heuristicIdx: 6.6 AbsError: -11.4, RelError: -0.63, SelError: -57%
-histogram: 18 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 18 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+heuristicIdx: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 12: [ { "$match" : { "a" : { "$gt" : 32 } } } ]
+[jsTest] Query 18: [ { "$match" : { "a" : { "$lt" : 35 } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 20
Cardinality estimates:
-heuristic: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-heuristicIdx: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -13.4, RelError: -0.67, SelError: -67%
+heuristicIdx: 6.6 AbsError: -13.4, RelError: -0.67, SelError: -67%
+histogram: 20 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 20 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 13: [ { "$match" : { "a" : { "$gte" : 32 } } } ]
+[jsTest] Query 19: [ { "$match" : { "a" : { "$lte" : 35 } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 20
Cardinality estimates:
-heuristic: 9 AbsError: 6, RelError: 2, SelError: 30%
-heuristicIdx: 9 AbsError: 6, RelError: 2, SelError: 30%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -13.4, RelError: -0.67, SelError: -67%
+heuristicIdx: 6.6 AbsError: -13.4, RelError: -0.67, SelError: -67%
+histogram: 20 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 20 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 14: [ { "$match" : { "a" : { "$gte" : 33 } } } ]
+[jsTest] Query 20: [ { "$match" : { "a" : { "$gt" : 35 } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-heuristicIdx: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+heuristicIdx: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 15: [ { "$match" : { "a" : { "$eq" : 34 } } } ]
+[jsTest] Query 21: [ { "$match" : { "a" : { "$gte" : 35 } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+heuristicIdx: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 16: [ { "$match" : { "a" : { "$gt" : 10, "$lt" : 12 } } } ]
+[jsTest] Query 22: [ { "$match" : { "a" : { "$gt" : 9, "$lt" : 11 } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 1.95 AbsError: 0.95, RelError: 0.95, SelError: 4.75%
+histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 17: [ { "$match" : { "a" : { "$gt" : 12, "$lte" : 14 } } } ]
+[jsTest] Query 23: [ { "$match" : { "a" : { "$gt" : 10, "$lte" : 12 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 4.61 AbsError: 2.61, RelError: 1.31, SelError: 13.05%
+histogram: 2.92 AbsError: 0.92, RelError: 0.46, SelError: 4.6%
histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 18: [ { "$match" : { "a" : { "$gte" : 17, "$lt" : 19 } } } ]
+[jsTest] Query 24: [ { "$match" : { "a" : { "$gte" : 12, "$lt" : 14 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 7.26 AbsError: 5.26, RelError: 2.63, SelError: 26.3%
+histogram: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 19: [ { "$match" : { "a" : { "$gte" : 25, "$lte" : 27 } } } ]
+[jsTest] Query 25: [ { "$match" : { "a" : { "$gte" : 17, "$lte" : 19 } } } ]
[jsTest] ----
Actual cardinality: 3
@@ -328,31 +408,43 @@ histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 20: [ { "$match" : { "a" : { "$gt" : 27, "$lt" : 29 } } } ]
+[jsTest] Query 26: [ { "$match" : { "a" : { "$gt" : 25, "$lt" : 27 } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 5.86 AbsError: 4.86, RelError: 4.86, SelError: 24.3%
+histogram: 6.97 AbsError: 5.97, RelError: 5.97, SelError: 29.85%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 21: [ { "$match" : { "a" : { "$gt" : 32, "$lte" : 34 } } } ]
+[jsTest] Query 27: [ { "$match" : { "a" : { "$gt" : 27, "$lte" : 29 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogram: 6.06 AbsError: 4.06, RelError: 2.03, SelError: 20.3%
histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 22: [ { "$match" : { "a" : { "$gte" : 33, "$lt" : 35 } } } ]
+[jsTest] Query 28: [ { "$match" : { "a" : { "$gte" : 32, "$lt" : 34 } } } ]
+[jsTest] ----
+
+Actual cardinality: 2
+Cardinality estimates:
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2.92 AbsError: 0.92, RelError: 0.46, SelError: 4.6%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 29: [ { "$match" : { "a" : { "$gte" : 33, "$lte" : 35 } } } ]
[jsTest] ----
Actual cardinality: 2
@@ -364,31 +456,43 @@ histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 23: [ { "$match" : { "a" : { "$gte" : 34, "$lte" : 36 } } } ]
+[jsTest] Query 30: [ { "$match" : { "a" : { "$gt" : 34, "$lt" : 36 } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 24: [ { "$match" : { "b" : { "$eq" : "a" } } } ]
+[jsTest] Query 31: [ { "$match" : { "a" : { "$gt" : 35, "$lte" : 37 } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 25: [ { "$match" : { "b" : { "$eq" : "c" } } } ]
+[jsTest] Query 32: [ { "$match" : { "b" : { "$eq" : "" } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+heuristicIdx: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 33: [ { "$match" : { "b" : { "$eq" : "a" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -400,91 +504,91 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 26: [ { "$match" : { "b" : { "$lt" : "c" } } } ]
+[jsTest] Query 34: [ { "$match" : { "b" : { "$lt" : "a" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 27: [ { "$match" : { "b" : { "$lte" : "c" } } } ]
+[jsTest] Query 35: [ { "$match" : { "b" : { "$lte" : "a" } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 1
Cardinality estimates:
-heuristic: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 28: [ { "$match" : { "b" : { "$gt" : "c" } } } ]
+[jsTest] Query 36: [ { "$match" : { "b" : { "$gt" : "a" } } } ]
[jsTest] ----
-Actual cardinality: 17
+Actual cardinality: 19
Cardinality estimates:
-heuristic: 9 AbsError: -8, RelError: -0.47, SelError: -40%
-heuristicIdx: 9 AbsError: -8, RelError: -0.47, SelError: -40%
-histogram: 17 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 17 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: -10, RelError: -0.53, SelError: -50%
+heuristicIdx: 9 AbsError: -10, RelError: -0.53, SelError: -50%
+histogram: 19 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 19 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 29: [ { "$match" : { "b" : { "$gte" : "c" } } } ]
+[jsTest] Query 37: [ { "$match" : { "b" : { "$gte" : "a" } } } ]
[jsTest] ----
-Actual cardinality: 18
+Actual cardinality: 20
Cardinality estimates:
-heuristic: 9 AbsError: -9, RelError: -0.5, SelError: -45%
-heuristicIdx: 9 AbsError: -9, RelError: -0.5, SelError: -45%
-histogram: 18 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 18 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: -11, RelError: -0.55, SelError: -55%
+heuristicIdx: 9 AbsError: -11, RelError: -0.55, SelError: -55%
+histogram: 20 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 20 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 30: [ { "$match" : { "b" : { "$lt" : "opqr" } } } ]
+[jsTest] Query 38: [ { "$match" : { "b" : { "$lt" : "c" } } } ]
[jsTest] ----
-Actual cardinality: 10
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 6.6 AbsError: -3.4, RelError: -0.34, SelError: -17%
-heuristicIdx: 6.6 AbsError: -3.4, RelError: -0.34, SelError: -17%
-histogram: 10 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 10 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 31: [ { "$match" : { "b" : { "$lte" : "stu" } } } ]
+[jsTest] Query 39: [ { "$match" : { "b" : { "$lte" : "opqr" } } } ]
[jsTest] ----
-Actual cardinality: 14
+Actual cardinality: 11
Cardinality estimates:
-heuristic: 6.6 AbsError: -7.4, RelError: -0.53, SelError: -37%
-heuristicIdx: 6.6 AbsError: -7.4, RelError: -0.53, SelError: -37%
-histogram: 14 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 14 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -4.4, RelError: -0.4, SelError: -22%
+heuristicIdx: 6.6 AbsError: -4.4, RelError: -0.4, SelError: -22%
+histogram: 11 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 11 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 32: [ { "$match" : { "b" : { "$gt" : "wxyz" } } } ]
+[jsTest] Query 40: [ { "$match" : { "b" : { "$gt" : "stu" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-heuristicIdx: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 3, RelError: 0.5, SelError: 15%
+heuristicIdx: 9 AbsError: 3, RelError: 0.5, SelError: 15%
+histogram: 6 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 33: [ { "$match" : { "b" : { "$eq" : "yz" } } } ]
+[jsTest] Query 41: [ { "$match" : { "b" : { "$eq" : "wxyz" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -496,7 +600,19 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 34: [ { "$match" : { "b" : { "$lt" : "yz" } } } ]
+[jsTest] Query 42: [ { "$match" : { "b" : { "$lt" : "wxyz" } } } ]
+[jsTest] ----
+
+Actual cardinality: 17
+Cardinality estimates:
+heuristic: 6.6 AbsError: -10.4, RelError: -0.61, SelError: -52%
+heuristicIdx: 6.6 AbsError: -10.4, RelError: -0.61, SelError: -52%
+histogram: 17 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 17 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 43: [ { "$match" : { "b" : { "$lte" : "wxyz" } } } ]
[jsTest] ----
Actual cardinality: 18
@@ -508,31 +624,31 @@ histogramIdx: 18 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 35: [ { "$match" : { "b" : { "$lte" : "yz" } } } ]
+[jsTest] Query 44: [ { "$match" : { "b" : { "$gt" : "wxyz" } } } ]
[jsTest] ----
-Actual cardinality: 19
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 6.6 AbsError: -12.4, RelError: -0.65, SelError: -62%
-heuristicIdx: 6.6 AbsError: -12.4, RelError: -0.65, SelError: -62%
-histogram: 19 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 19 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 7, RelError: 3.5, SelError: 35%
+heuristicIdx: 9 AbsError: 7, RelError: 3.5, SelError: 35%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 36: [ { "$match" : { "b" : { "$gt" : "yz" } } } ]
+[jsTest] Query 45: [ { "$match" : { "b" : { "$gte" : "wxyz" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 3
Cardinality estimates:
-heuristic: 9 AbsError: 8, RelError: 8, SelError: 40%
-heuristicIdx: 9 AbsError: 8, RelError: 8, SelError: 40%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 6, RelError: 2, SelError: 30%
+heuristicIdx: 9 AbsError: 6, RelError: 2, SelError: 30%
+histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 37: [ { "$match" : { "b" : { "$gte" : "yz" } } } ]
+[jsTest] Query 46: [ { "$match" : { "b" : { "$gte" : "yz" } } } ]
[jsTest] ----
Actual cardinality: 2
@@ -544,19 +660,43 @@ histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 38: [ { "$match" : { "b" : { "$gte" : "yzab" } } } ]
+[jsTest] Query 47: [ { "$match" : { "b" : { "$eq" : "yzab" } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
-heuristic: 9 AbsError: 8, RelError: 8, SelError: 40%
-heuristicIdx: 9 AbsError: 8, RelError: 8, SelError: 40%
+heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
+heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 39: [ { "$match" : { "b" : { "$gt" : "a", "$lt" : "b" } } } ]
+[jsTest] Query 48: [ { "$match" : { "b" : { "$lt" : "yzbb" } } } ]
+[jsTest] ----
+
+Actual cardinality: 20
+Cardinality estimates:
+heuristic: 6.6 AbsError: -13.4, RelError: -0.67, SelError: -67%
+heuristicIdx: 6.6 AbsError: -13.4, RelError: -0.67, SelError: -67%
+histogram: 20 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 20 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 49: [ { "$match" : { "b" : { "$gt" : "", "$lt" : "1" } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 50: [ { "$match" : { "b" : { "$gt" : "a", "$lte" : "b" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -568,19 +708,19 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 40: [ { "$match" : { "b" : { "$gt" : "c", "$lte" : "d" } } } ]
+[jsTest] Query 51: [ { "$match" : { "b" : { "$gte" : "c", "$lt" : "d" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 3.69 AbsError: 2.69, RelError: 2.69, SelError: 13.45%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 41: [ { "$match" : { "b" : { "$gte" : "opqr", "$lt" : "oprr" } } } ]
+[jsTest] Query 52: [ { "$match" : { "b" : { "$gte" : "opqr", "$lte" : "oprr" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -592,19 +732,19 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 42: [ { "$match" : { "b" : { "$gte" : "stu", "$lte" : "stv" } } } ]
+[jsTest] Query 53: [ { "$match" : { "b" : { "$gt" : "stu", "$lt" : "stv" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 5.86 AbsError: 4.86, RelError: 4.86, SelError: 24.3%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 5.02 AbsError: 5.02, RelError: 0.5, SelError: 25.1%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 43: [ { "$match" : { "b" : { "$gt" : "wxyz", "$lt" : "wxzz" } } } ]
+[jsTest] Query 54: [ { "$match" : { "b" : { "$gt" : "wxyz", "$lte" : "wxzz" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -616,19 +756,19 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 44: [ { "$match" : { "b" : { "$gt" : "yz", "$lte" : "y{" } } } ]
+[jsTest] Query 55: [ { "$match" : { "b" : { "$gte" : "yz", "$lt" : "y{" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 45: [ { "$match" : { "b" : { "$gte" : "yzab", "$lt" : "yzbb" } } } ]
+[jsTest] Query 56: [ { "$match" : { "b" : { "$gte" : "yzab", "$lte" : "yzbb" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -640,31 +780,55 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 46: [ { "$match" : { "b" : { "$gte" : "a", "$lte" : "c" } } } ]
+[jsTest] Query 57: [ { "$match" : { "b" : { "$gt" : "yzbb", "$lt" : "yzcb" } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 47: [ { "$match" : { "b" : { "$gt" : "c", "$lt" : "e" } } } ]
+[jsTest] Query 58: [ { "$match" : { "b" : { "$gt" : "", "$lte" : "2" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 3.69 AbsError: 2.69, RelError: 2.69, SelError: 13.45%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 59: [ { "$match" : { "b" : { "$gte" : "a", "$lt" : "c" } } } ]
+[jsTest] ----
+
+Actual cardinality: 2
+Cardinality estimates:
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 60: [ { "$match" : { "b" : { "$gte" : "c", "$lte" : "e" } } } ]
+[jsTest] ----
+
+Actual cardinality: 2
+Cardinality estimates:
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 48: [ { "$match" : { "b" : { "$gt" : "opqr", "$lte" : "orqr" } } } ]
+[jsTest] Query 61: [ { "$match" : { "b" : { "$gt" : "opqr", "$lt" : "orqr" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -676,19 +840,19 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 49: [ { "$match" : { "b" : { "$gte" : "stu", "$lt" : "svu" } } } ]
+[jsTest] Query 62: [ { "$match" : { "b" : { "$gt" : "stu", "$lte" : "svu" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 5.86 AbsError: 4.86, RelError: 4.86, SelError: 24.3%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 5.02 AbsError: 5.02, RelError: 0.5, SelError: 25.1%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 50: [ { "$match" : { "b" : { "$gte" : "wxyz", "$lte" : "wzyz" } } } ]
+[jsTest] Query 63: [ { "$match" : { "b" : { "$gte" : "wxyz", "$lt" : "wzyz" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -700,19 +864,43 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 51: [ { "$match" : { "b" : { "$gt" : "yz", "$lt" : "y|" } } } ]
+[jsTest] Query 64: [ { "$match" : { "b" : { "$gte" : "yz", "$lte" : "y|" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 65: [ { "$match" : { "b" : { "$gt" : "yzab", "$lt" : "y|ab" } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 66: [ { "$match" : { "b" : { "$gt" : "yzbb", "$lte" : "y|bb" } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 52: [ { "$match" : { "b" : { "$gt" : "yzab", "$lte" : "y|ab" } } } ]
+[jsTest] Query 67: [ { "$match" : { "b" : { "$gte" : "", "$lt" : "3" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -724,7 +912,7 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 53: [ { "$match" : { "b" : { "$gte" : "a", "$lt" : "d" } } } ]
+[jsTest] Query 68: [ { "$match" : { "b" : { "$gte" : "a", "$lte" : "d" } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -736,19 +924,19 @@ histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 54: [ { "$match" : { "b" : { "$gte" : "c", "$lte" : "f" } } } ]
+[jsTest] Query 69: [ { "$match" : { "b" : { "$gt" : "c", "$lt" : "f" } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 4.74 AbsError: 1.74, RelError: 0.58, SelError: 8.7%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 4.61 AbsError: 2.61, RelError: 1.31, SelError: 13.05%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 55: [ { "$match" : { "b" : { "$gt" : "opqr", "$lt" : "rpqr" } } } ]
+[jsTest] Query 70: [ { "$match" : { "b" : { "$gt" : "opqr", "$lte" : "rpqr" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -760,19 +948,19 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 56: [ { "$match" : { "b" : { "$gt" : "stu", "$lte" : "vtu" } } } ]
+[jsTest] Query 71: [ { "$match" : { "b" : { "$gte" : "stu", "$lt" : "vtu" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 3
Cardinality estimates:
-heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 5.37 AbsError: 3.37, RelError: 1.69, SelError: 16.85%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
+heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
+histogram: 6.26 AbsError: 3.26, RelError: 1.09, SelError: 16.3%
+histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 57: [ { "$match" : { "b" : { "$gte" : "wxyz", "$lt" : "zxyz" } } } ]
+[jsTest] Query 72: [ { "$match" : { "b" : { "$gte" : "wxyz", "$lte" : "zxyz" } } } ]
[jsTest] ----
Actual cardinality: 3
@@ -784,19 +972,19 @@ histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 58: [ { "$match" : { "b" : { "$gte" : "yz", "$lte" : "|z" } } } ]
+[jsTest] Query 73: [ { "$match" : { "b" : { "$gt" : "yz", "$lt" : "|z" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 1
Cardinality estimates:
-heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 59: [ { "$match" : { "b" : { "$gt" : "yzab", "$lt" : "|zab" } } } ]
+[jsTest] Query 74: [ { "$match" : { "b" : { "$gt" : "yzab", "$lte" : "|zab" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -808,67 +996,67 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 60: [ { "$match" : { "c" : { "$eq" : 1 } } } ]
+[jsTest] Query 75: [ { "$match" : { "b" : { "$gte" : "yzbb", "$lt" : "|zbb" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.47 AbsError: 2.47, RelError: 1.23, SelError: 12.35%
-heuristicIdx: 4.47 AbsError: 2.47, RelError: 1.23, SelError: 12.35%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 61: [ { "$match" : { "c" : { "$eq" : 2 } } } ]
+[jsTest] Query 76: [ { "$match" : { "c" : { "$eq" : 0 } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.47 AbsError: 2.47, RelError: 1.23, SelError: 12.35%
-heuristicIdx: 4.47 AbsError: 2.47, RelError: 1.23, SelError: 12.35%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+heuristicIdx: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 62: [ { "$match" : { "c" : { "$lt" : 2 } } } ]
+[jsTest] Query 77: [ { "$match" : { "c" : { "$eq" : 1 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
-heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+heuristic: 4.47 AbsError: 2.47, RelError: 1.23, SelError: 12.35%
+heuristicIdx: 4.47 AbsError: 2.47, RelError: 1.23, SelError: 12.35%
histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 63: [ { "$match" : { "c" : { "$lte" : 2 } } } ]
+[jsTest] Query 78: [ { "$match" : { "c" : { "$lt" : 1 } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 64: [ { "$match" : { "c" : { "$gt" : 2 } } } ]
+[jsTest] Query 79: [ { "$match" : { "c" : { "$lte" : 1 } } } ]
[jsTest] ----
-Actual cardinality: 18
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 9 AbsError: -9, RelError: -0.5, SelError: -45%
-heuristicIdx: 9 AbsError: -9, RelError: -0.5, SelError: -45%
-histogram: 18 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 18 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 65: [ { "$match" : { "c" : { "$gte" : 2 } } } ]
+[jsTest] Query 80: [ { "$match" : { "c" : { "$gt" : 1 } } } ]
[jsTest] ----
Actual cardinality: 19
@@ -880,31 +1068,43 @@ histogramIdx: 19 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 66: [ { "$match" : { "c" : { "$lt" : 3 } } } ]
+[jsTest] Query 81: [ { "$match" : { "c" : { "$gte" : 1 } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 20
Cardinality estimates:
-heuristic: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: -11, RelError: -0.55, SelError: -55%
+heuristicIdx: 9 AbsError: -11, RelError: -0.55, SelError: -55%
+histogram: 20 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 20 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 67: [ { "$match" : { "c" : { "$lte" : 4 } } } ]
+[jsTest] Query 82: [ { "$match" : { "c" : { "$lt" : 2 } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 6.6 AbsError: 1.6, RelError: 0.32, SelError: 8%
-heuristicIdx: 6.6 AbsError: 1.6, RelError: 0.32, SelError: 8%
-histogram: 5 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 5 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 83: [ { "$match" : { "c" : { "$lte" : 3 } } } ]
+[jsTest] ----
+
+Actual cardinality: 4
+Cardinality estimates:
+heuristic: 6.6 AbsError: 2.6, RelError: 0.65, SelError: 13%
+heuristicIdx: 6.6 AbsError: 2.6, RelError: 0.65, SelError: 13%
+histogram: 4 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 68: [ { "$match" : { "c" : { "$gt" : 5 } } } ]
+[jsTest] Query 84: [ { "$match" : { "c" : { "$gt" : 5 } } } ]
[jsTest] ----
Actual cardinality: 16
@@ -916,7 +1116,7 @@ histogramIdx: 16 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 69: [ { "$match" : { "c" : { "$eq" : 9 } } } ]
+[jsTest] Query 85: [ { "$match" : { "c" : { "$eq" : 9 } } } ]
[jsTest] ----
Actual cardinality: 3
@@ -928,7 +1128,7 @@ histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 70: [ { "$match" : { "c" : { "$lt" : 9 } } } ]
+[jsTest] Query 86: [ { "$match" : { "c" : { "$lt" : 9 } } } ]
[jsTest] ----
Actual cardinality: 10
@@ -940,7 +1140,7 @@ histogramIdx: 10 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 71: [ { "$match" : { "c" : { "$lte" : 9 } } } ]
+[jsTest] Query 87: [ { "$match" : { "c" : { "$lte" : 9 } } } ]
[jsTest] ----
Actual cardinality: 11
@@ -952,7 +1152,7 @@ histogramIdx: 11 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 72: [ { "$match" : { "c" : { "$gt" : 9 } } } ]
+[jsTest] Query 88: [ { "$match" : { "c" : { "$gt" : 9 } } } ]
[jsTest] ----
Actual cardinality: 10
@@ -964,7 +1164,7 @@ histogramIdx: 10 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 73: [ { "$match" : { "c" : { "$gte" : 9 } } } ]
+[jsTest] Query 89: [ { "$match" : { "c" : { "$gte" : 9 } } } ]
[jsTest] ----
Actual cardinality: 12
@@ -976,7 +1176,7 @@ histogramIdx: 12 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 74: [ { "$match" : { "c" : { "$gte" : 15 } } } ]
+[jsTest] Query 90: [ { "$match" : { "c" : { "$gte" : 15 } } } ]
[jsTest] ----
Actual cardinality: 9
@@ -988,7 +1188,7 @@ histogramIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 75: [ { "$match" : { "c" : { "$eq" : 16 } } } ]
+[jsTest] Query 91: [ { "$match" : { "c" : { "$eq" : 16 } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1000,7 +1200,7 @@ histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 76: [ { "$match" : { "c" : { "$lt" : 17 } } } ]
+[jsTest] Query 92: [ { "$match" : { "c" : { "$lt" : 17 } } } ]
[jsTest] ----
Actual cardinality: 15
@@ -1012,7 +1212,7 @@ histogramIdx: 15 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 77: [ { "$match" : { "c" : { "$eq" : 18 } } } ]
+[jsTest] Query 93: [ { "$match" : { "c" : { "$eq" : 18 } } } ]
[jsTest] ----
Actual cardinality: 6
@@ -1024,7 +1224,7 @@ histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 78: [ { "$match" : { "c" : { "$lt" : 18 } } } ]
+[jsTest] Query 94: [ { "$match" : { "c" : { "$lt" : 18 } } } ]
[jsTest] ----
Actual cardinality: 16
@@ -1036,7 +1236,7 @@ histogramIdx: 16 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 79: [ { "$match" : { "c" : { "$lte" : 18 } } } ]
+[jsTest] Query 95: [ { "$match" : { "c" : { "$lte" : 18 } } } ]
[jsTest] ----
Actual cardinality: 18
@@ -1048,7 +1248,7 @@ histogramIdx: 18 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 80: [ { "$match" : { "c" : { "$gt" : 18 } } } ]
+[jsTest] Query 96: [ { "$match" : { "c" : { "$gt" : 18 } } } ]
[jsTest] ----
Actual cardinality: 6
@@ -1060,7 +1260,7 @@ histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 81: [ { "$match" : { "c" : { "$gte" : 18 } } } ]
+[jsTest] Query 97: [ { "$match" : { "c" : { "$gte" : 18 } } } ]
[jsTest] ----
Actual cardinality: 8
@@ -1072,7 +1272,7 @@ histogramIdx: 8 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 82: [ { "$match" : { "c" : { "$lte" : 19 } } } ]
+[jsTest] Query 98: [ { "$match" : { "c" : { "$lte" : 19 } } } ]
[jsTest] ----
Actual cardinality: 19
@@ -1084,7 +1284,7 @@ histogramIdx: 19 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 83: [ { "$match" : { "c" : { "$gt" : 20 } } } ]
+[jsTest] Query 99: [ { "$match" : { "c" : { "$gt" : 20 } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -1096,19 +1296,31 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 84: [ { "$match" : { "c" : { "$gt" : 1, "$lt" : 2 } } } ]
+[jsTest] Query 100: [ { "$match" : { "c" : { "$gte" : 21 } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-histogram: 1.95 AbsError: 0.95, RelError: 0.95, SelError: 4.75%
-histogramIdx: 1.95 AbsError: 0.95, RelError: 0.95, SelError: 4.75%
+heuristic: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+heuristicIdx: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 101: [ { "$match" : { "c" : { "$gt" : 0, "$lt" : 1 } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 85: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 1, "$lt" : 2 } } } } ]
+[jsTest] Query 102: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 0, "$lt" : 1 } } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -1120,19 +1332,19 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 86: [ { "$match" : { "c" : { "$gt" : 2, "$lte" : 3 } } } ]
+[jsTest] Query 103: [ { "$match" : { "c" : { "$gt" : 1, "$lte" : 2 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-histogram: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
-histogramIdx: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
+histogram: 2.92 AbsError: 0.92, RelError: 0.46, SelError: 4.6%
+histogramIdx: 2.92 AbsError: 0.92, RelError: 0.46, SelError: 4.6%
[jsTest] ----
-[jsTest] Query 87: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 2, "$lte" : 3 } } } } ]
+[jsTest] Query 104: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 1, "$lte" : 2 } } } } ]
[jsTest] ----
Actual cardinality: 2
@@ -1144,19 +1356,19 @@ histogramIdx: 1.63 AbsError: -0.37, RelError: -0.19, SelError: -1.85%
[jsTest] ----
-[jsTest] Query 88: [ { "$match" : { "c" : { "$gte" : 3, "$lt" : 4 } } } ]
+[jsTest] Query 105: [ { "$match" : { "c" : { "$gte" : 2, "$lt" : 3 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-histogram: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
-histogramIdx: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
+histogram: 2.92 AbsError: 0.92, RelError: 0.46, SelError: 4.6%
+histogramIdx: 2.92 AbsError: 0.92, RelError: 0.46, SelError: 4.6%
[jsTest] ----
-[jsTest] Query 89: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lt" : 4 } } } } ]
+[jsTest] Query 106: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 2, "$lt" : 3 } } } } ]
[jsTest] ----
Actual cardinality: 2
@@ -1168,7 +1380,7 @@ histogramIdx: 1.63 AbsError: -0.37, RelError: -0.19, SelError: -1.85%
[jsTest] ----
-[jsTest] Query 90: [ { "$match" : { "c" : { "$gte" : 4, "$lte" : 5 } } } ]
+[jsTest] Query 107: [ { "$match" : { "c" : { "$gte" : 3, "$lte" : 5 } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1180,19 +1392,19 @@ histogramIdx: 5.69 AbsError: 1.69, RelError: 0.42, SelError: 8.45%
[jsTest] ----
-[jsTest] Query 91: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 4, "$lte" : 5 } } } } ]
+[jsTest] Query 108: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 5 } } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
-histogramIdx: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
+histogram: 7.35 AbsError: 3.35, RelError: 0.84, SelError: 16.75%
+histogramIdx: 7.35 AbsError: 3.35, RelError: 0.84, SelError: 16.75%
[jsTest] ----
-[jsTest] Query 92: [ { "$match" : { "c" : { "$gt" : 5, "$lt" : 9 } } } ]
+[jsTest] Query 109: [ { "$match" : { "c" : { "$gt" : 5, "$lt" : 9 } } } ]
[jsTest] ----
Actual cardinality: 6
@@ -1204,7 +1416,7 @@ histogramIdx: 8.94 AbsError: 2.94, RelError: 0.49, SelError: 14.7%
[jsTest] ----
-[jsTest] Query 93: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 5, "$lt" : 9 } } } } ]
+[jsTest] Query 110: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 5, "$lt" : 9 } } } } ]
[jsTest] ----
Actual cardinality: 6
@@ -1216,7 +1428,7 @@ histogramIdx: 8.17 AbsError: 2.17, RelError: 0.36, SelError: 10.85%
[jsTest] ----
-[jsTest] Query 94: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 15 } } } ]
+[jsTest] Query 111: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 15 } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1228,7 +1440,7 @@ histogramIdx: 8.37 AbsError: 4.37, RelError: 1.09, SelError: 21.85%
[jsTest] ----
-[jsTest] Query 95: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 9, "$lte" : 15 } } } } ]
+[jsTest] Query 112: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 9, "$lte" : 15 } } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1240,7 +1452,7 @@ histogramIdx: 4.08 AbsError: 0.08, RelError: 0.02, SelError: 0.4%
[jsTest] ----
-[jsTest] Query 96: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ]
+[jsTest] Query 113: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ]
[jsTest] ----
Actual cardinality: 3
@@ -1252,7 +1464,7 @@ histogramIdx: 7.53 AbsError: 4.53, RelError: 1.51, SelError: 22.65%
[jsTest] ----
-[jsTest] Query 97: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lt" : 16 } } } } ]
+[jsTest] Query 114: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lt" : 16 } } } } ]
[jsTest] ----
Actual cardinality: 3
@@ -1264,7 +1476,7 @@ histogramIdx: 2.45 AbsError: -0.55, RelError: -0.18, SelError: -2.75%
[jsTest] ----
-[jsTest] Query 98: [ { "$match" : { "c" : { "$gte" : 16, "$lte" : 17 } } } ]
+[jsTest] Query 115: [ { "$match" : { "c" : { "$gte" : 16, "$lte" : 17 } } } ]
[jsTest] ----
Actual cardinality: 5
@@ -1276,7 +1488,7 @@ histogramIdx: 8.05 AbsError: 3.05, RelError: 0.61, SelError: 15.25%
[jsTest] ----
-[jsTest] Query 99: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lte" : 17 } } } } ]
+[jsTest] Query 116: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lte" : 17 } } } } ]
[jsTest] ----
Actual cardinality: 5
@@ -1288,7 +1500,7 @@ histogramIdx: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
[jsTest] ----
-[jsTest] Query 100: [ { "$match" : { "c" : { "$gt" : 17, "$lt" : 18 } } } ]
+[jsTest] Query 117: [ { "$match" : { "c" : { "$gt" : 17, "$lt" : 18 } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1300,7 +1512,7 @@ histogramIdx: 7.16 AbsError: 3.16, RelError: 0.79, SelError: 15.8%
[jsTest] ----
-[jsTest] Query 101: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 17, "$lt" : 18 } } } } ]
+[jsTest] Query 118: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 17, "$lt" : 18 } } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -1312,7 +1524,7 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 102: [ { "$match" : { "c" : { "$gt" : 18, "$lte" : 19 } } } ]
+[jsTest] Query 119: [ { "$match" : { "c" : { "$gt" : 18, "$lte" : 19 } } } ]
[jsTest] ----
Actual cardinality: 5
@@ -1324,7 +1536,7 @@ histogramIdx: 5.85 AbsError: 0.85, RelError: 0.17, SelError: 4.25%
[jsTest] ----
-[jsTest] Query 103: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 18, "$lte" : 19 } } } } ]
+[jsTest] Query 120: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 18, "$lte" : 19 } } } } ]
[jsTest] ----
Actual cardinality: 5
@@ -1336,7 +1548,7 @@ histogramIdx: 4.08 AbsError: -0.92, RelError: -0.18, SelError: -4.6%
[jsTest] ----
-[jsTest] Query 104: [ { "$match" : { "c" : { "$gte" : 19, "$lt" : 20 } } } ]
+[jsTest] Query 121: [ { "$match" : { "c" : { "$gte" : 19, "$lt" : 20 } } } ]
[jsTest] ----
Actual cardinality: 5
@@ -1348,7 +1560,7 @@ histogramIdx: 5.85 AbsError: 0.85, RelError: 0.17, SelError: 4.25%
[jsTest] ----
-[jsTest] Query 105: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 19, "$lt" : 20 } } } } ]
+[jsTest] Query 122: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 19, "$lt" : 20 } } } } ]
[jsTest] ----
Actual cardinality: 5
@@ -1360,7 +1572,7 @@ histogramIdx: 4.08 AbsError: -0.92, RelError: -0.18, SelError: -4.6%
[jsTest] ----
-[jsTest] Query 106: [ { "$match" : { "c" : { "$gte" : 1, "$lte" : 3 } } } ]
+[jsTest] Query 123: [ { "$match" : { "c" : { "$gte" : 20, "$lte" : 21 } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1372,55 +1584,79 @@ histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 107: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 1, "$lte" : 3 } } } } ]
+[jsTest] Query 124: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 20, "$lte" : 21 } } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 4.9 AbsError: 0.9, RelError: 0.23, SelError: 4.5%
-histogramIdx: 4.9 AbsError: 0.9, RelError: 0.23, SelError: 4.5%
+histogram: 4 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 108: [ { "$match" : { "c" : { "$gt" : 2, "$lt" : 4 } } } ]
+[jsTest] Query 125: [ { "$match" : { "c" : { "$gt" : 0, "$lt" : 2 } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-histogram: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
-histogramIdx: 3.79 AbsError: 1.79, RelError: 0.9, SelError: 8.95%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 109: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 2, "$lt" : 4 } } } } ]
+[jsTest] Query 126: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 0, "$lt" : 2 } } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-histogram: 1.63 AbsError: -0.37, RelError: -0.19, SelError: -1.85%
-histogramIdx: 1.63 AbsError: -0.37, RelError: -0.19, SelError: -1.85%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 110: [ { "$match" : { "c" : { "$gt" : 3, "$lte" : 5 } } } ]
+[jsTest] Query 127: [ { "$match" : { "c" : { "$gt" : 1, "$lte" : 3 } } } ]
+[jsTest] ----
+
+Actual cardinality: 3
+Cardinality estimates:
+heuristic: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
+heuristicIdx: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
+histogram: 3.9 AbsError: 0.9, RelError: 0.3, SelError: 4.5%
+histogramIdx: 3.9 AbsError: 0.9, RelError: 0.3, SelError: 4.5%
+
+
+[jsTest] ----
+[jsTest] Query 128: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 1, "$lte" : 3 } } } } ]
+[jsTest] ----
+
+Actual cardinality: 3
+Cardinality estimates:
+heuristic: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
+heuristicIdx: 4.43 AbsError: 1.43, RelError: 0.48, SelError: 7.15%
+histogram: 3.27 AbsError: 0.27, RelError: 0.09, SelError: 1.35%
+histogramIdx: 3.27 AbsError: 0.27, RelError: 0.09, SelError: 1.35%
+
+
+[jsTest] ----
+[jsTest] Query 129: [ { "$match" : { "c" : { "$gte" : 2, "$lt" : 5 } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 5.69 AbsError: 1.69, RelError: 0.42, SelError: 8.45%
-histogramIdx: 5.69 AbsError: 1.69, RelError: 0.42, SelError: 8.45%
+histogram: 4.87 AbsError: 0.87, RelError: 0.22, SelError: 4.35%
+histogramIdx: 4.87 AbsError: 0.87, RelError: 0.22, SelError: 4.35%
[jsTest] ----
-[jsTest] Query 111: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 3, "$lte" : 5 } } } } ]
+[jsTest] Query 130: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 2, "$lt" : 5 } } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1432,199 +1668,223 @@ histogramIdx: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
[jsTest] ----
-[jsTest] Query 112: [ { "$match" : { "c" : { "$gte" : 4, "$lt" : 9 } } } ]
+[jsTest] Query 131: [ { "$match" : { "c" : { "$gte" : 3, "$lte" : 9 } } } ]
+[jsTest] ----
+
+Actual cardinality: 9
+Cardinality estimates:
+heuristic: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+heuristicIdx: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+histogram: 10.44 AbsError: 1.44, RelError: 0.16, SelError: 7.2%
+histogramIdx: 10.44 AbsError: 1.44, RelError: 0.16, SelError: 7.2%
+
+
+[jsTest] ----
+[jsTest] Query 132: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ]
+[jsTest] ----
+
+Actual cardinality: 9
+Cardinality estimates:
+heuristic: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+heuristicIdx: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+histogram: 17.97 AbsError: 8.97, RelError: 1, SelError: 44.85%
+histogramIdx: 17.97 AbsError: 8.97, RelError: 1, SelError: 44.85%
+
+
+[jsTest] ----
+[jsTest] Query 133: [ { "$match" : { "c" : { "$gt" : 5, "$lt" : 15 } } } ]
[jsTest] ----
Actual cardinality: 8
Cardinality estimates:
heuristic: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
heuristicIdx: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-histogram: 9.49 AbsError: 1.49, RelError: 0.19, SelError: 7.45%
-histogramIdx: 9.49 AbsError: 1.49, RelError: 0.19, SelError: 7.45%
+histogram: 10.73 AbsError: 2.73, RelError: 0.34, SelError: 13.65%
+histogramIdx: 10.73 AbsError: 2.73, RelError: 0.34, SelError: 13.65%
[jsTest] ----
-[jsTest] Query 113: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 4, "$lt" : 9 } } } } ]
+[jsTest] Query 134: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 5, "$lt" : 15 } } } } ]
[jsTest] ----
Actual cardinality: 8
Cardinality estimates:
heuristic: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
heuristicIdx: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-histogram: 13.89 AbsError: 5.89, RelError: 0.74, SelError: 29.45%
-histogramIdx: 13.89 AbsError: 5.89, RelError: 0.74, SelError: 29.45%
+histogram: 12.25 AbsError: 4.25, RelError: 0.53, SelError: 21.25%
+histogramIdx: 12.25 AbsError: 4.25, RelError: 0.53, SelError: 21.25%
[jsTest] ----
-[jsTest] Query 114: [ { "$match" : { "c" : { "$gte" : 5, "$lte" : 15 } } } ]
+[jsTest] Query 135: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 16 } } } ]
[jsTest] ----
-Actual cardinality: 12
+Actual cardinality: 5
Cardinality estimates:
-heuristic: 4.43 AbsError: -7.57, RelError: -0.63, SelError: -37.85%
-heuristicIdx: 4.43 AbsError: -7.57, RelError: -0.63, SelError: -37.85%
-histogram: 13.28 AbsError: 1.28, RelError: 0.11, SelError: 6.4%
-histogramIdx: 13.28 AbsError: 1.28, RelError: 0.11, SelError: 6.4%
+heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+histogram: 8.66 AbsError: 3.66, RelError: 0.73, SelError: 18.3%
+histogramIdx: 8.66 AbsError: 3.66, RelError: 0.73, SelError: 18.3%
[jsTest] ----
-[jsTest] Query 115: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 5, "$lte" : 15 } } } } ]
+[jsTest] Query 136: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 9, "$lte" : 16 } } } } ]
[jsTest] ----
-Actual cardinality: 12
+Actual cardinality: 5
Cardinality estimates:
-heuristic: 4.43 AbsError: -7.57, RelError: -0.63, SelError: -37.85%
-heuristicIdx: 4.43 AbsError: -7.57, RelError: -0.63, SelError: -37.85%
-histogram: 17.97 AbsError: 5.97, RelError: 0.5, SelError: 29.85%
-histogramIdx: 17.97 AbsError: 5.97, RelError: 0.5, SelError: 29.85%
+heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+histogram: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
+histogramIdx: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
[jsTest] ----
-[jsTest] Query 116: [ { "$match" : { "c" : { "$gt" : 9, "$lt" : 16 } } } ]
+[jsTest] Query 137: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 17 } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 8.37 AbsError: 4.37, RelError: 1.09, SelError: 21.85%
-histogramIdx: 8.37 AbsError: 4.37, RelError: 1.09, SelError: 21.85%
+histogram: 7.79 AbsError: 3.79, RelError: 0.95, SelError: 18.95%
+histogramIdx: 7.79 AbsError: 3.79, RelError: 0.95, SelError: 18.95%
[jsTest] ----
-[jsTest] Query 117: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 9, "$lt" : 16 } } } } ]
+[jsTest] Query 138: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lt" : 17 } } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 4.08 AbsError: 0.08, RelError: 0.02, SelError: 0.4%
-histogramIdx: 4.08 AbsError: 0.08, RelError: 0.02, SelError: 0.4%
+histogram: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
+histogramIdx: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
[jsTest] ----
-[jsTest] Query 118: [ { "$match" : { "c" : { "$gt" : 15, "$lte" : 17 } } } ]
+[jsTest] Query 139: [ { "$match" : { "c" : { "$gte" : 16, "$lte" : 18 } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 7
Cardinality estimates:
-heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-histogram: 8.05 AbsError: 3.05, RelError: 0.61, SelError: 15.25%
-histogramIdx: 8.05 AbsError: 3.05, RelError: 0.61, SelError: 15.25%
+heuristic: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
+heuristicIdx: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
+histogram: 8.54 AbsError: 1.54, RelError: 0.22, SelError: 7.7%
+histogramIdx: 8.54 AbsError: 1.54, RelError: 0.22, SelError: 7.7%
[jsTest] ----
-[jsTest] Query 119: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 15, "$lte" : 17 } } } } ]
+[jsTest] Query 140: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lte" : 18 } } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 7
Cardinality estimates:
-heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-histogram: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
-histogramIdx: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
+heuristic: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
+heuristicIdx: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
+histogram: 12.25 AbsError: 5.25, RelError: 0.75, SelError: 26.25%
+histogramIdx: 12.25 AbsError: 5.25, RelError: 0.75, SelError: 26.25%
[jsTest] ----
-[jsTest] Query 120: [ { "$match" : { "c" : { "$gte" : 16, "$lt" : 18 } } } ]
+[jsTest] Query 141: [ { "$match" : { "c" : { "$gt" : 17, "$lt" : 19 } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-histogram: 8.05 AbsError: 3.05, RelError: 0.61, SelError: 15.25%
-histogramIdx: 8.05 AbsError: 3.05, RelError: 0.61, SelError: 15.25%
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 7.59 AbsError: 1.59, RelError: 0.26, SelError: 7.95%
+histogramIdx: 7.59 AbsError: 1.59, RelError: 0.26, SelError: 7.95%
[jsTest] ----
-[jsTest] Query 121: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lt" : 18 } } } } ]
+[jsTest] Query 142: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 17, "$lt" : 19 } } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-histogram: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
-histogramIdx: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 4.9 AbsError: -1.1, RelError: -0.18, SelError: -5.5%
+histogramIdx: 4.9 AbsError: -1.1, RelError: -0.18, SelError: -5.5%
[jsTest] ----
-[jsTest] Query 122: [ { "$match" : { "c" : { "$gte" : 17, "$lte" : 19 } } } ]
+[jsTest] Query 143: [ { "$match" : { "c" : { "$gt" : 18, "$lte" : 20 } } } ]
[jsTest] ----
-Actual cardinality: 8
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-heuristicIdx: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-histogram: 8.77 AbsError: 0.77, RelError: 0.1, SelError: 3.85%
-histogramIdx: 8.77 AbsError: 0.77, RelError: 0.1, SelError: 3.85%
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 6 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 123: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 17, "$lte" : 19 } } } } ]
+[jsTest] Query 144: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 18, "$lte" : 20 } } } } ]
[jsTest] ----
-Actual cardinality: 8
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-heuristicIdx: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-histogram: 13.07 AbsError: 5.07, RelError: 0.63, SelError: 25.35%
-histogramIdx: 13.07 AbsError: 5.07, RelError: 0.63, SelError: 25.35%
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 7.35 AbsError: 1.35, RelError: 0.22, SelError: 6.75%
+histogramIdx: 7.35 AbsError: 1.35, RelError: 0.22, SelError: 6.75%
[jsTest] ----
-[jsTest] Query 124: [ { "$match" : { "c" : { "$gt" : 18, "$lt" : 20 } } } ]
+[jsTest] Query 145: [ { "$match" : { "c" : { "$gte" : 19, "$lt" : 21 } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-histogram: 5.85 AbsError: 0.85, RelError: 0.17, SelError: 4.25%
-histogramIdx: 5.85 AbsError: 0.85, RelError: 0.17, SelError: 4.25%
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 6 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 125: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 18, "$lt" : 20 } } } } ]
+[jsTest] Query 146: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 19, "$lt" : 21 } } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 6
Cardinality estimates:
-heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
-histogram: 4.08 AbsError: -0.92, RelError: -0.18, SelError: -4.6%
-histogramIdx: 4.08 AbsError: -0.92, RelError: -0.18, SelError: -4.6%
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 7.35 AbsError: 1.35, RelError: 0.22, SelError: 6.75%
+histogramIdx: 7.35 AbsError: 1.35, RelError: 0.22, SelError: 6.75%
[jsTest] ----
-[jsTest] Query 126: [ { "$match" : { "c" : { "$gt" : 1, "$lte" : 4 } } } ]
+[jsTest] Query 147: [ { "$match" : { "c" : { "$gte" : 0, "$lte" : 3 } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 4.87 AbsError: 0.87, RelError: 0.22, SelError: 4.35%
-histogramIdx: 4.87 AbsError: 0.87, RelError: 0.22, SelError: 4.35%
+histogram: 4 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 127: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 1, "$lte" : 4 } } } } ]
+[jsTest] Query 148: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 0, "$lte" : 3 } } } } ]
[jsTest] ----
Actual cardinality: 4
Cardinality estimates:
heuristic: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
heuristicIdx: 4.43 AbsError: 0.43, RelError: 0.11, SelError: 2.15%
-histogram: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
-histogramIdx: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
+histogram: 4.9 AbsError: 0.9, RelError: 0.23, SelError: 4.5%
+histogramIdx: 4.9 AbsError: 0.9, RelError: 0.23, SelError: 4.5%
[jsTest] ----
-[jsTest] Query 128: [ { "$match" : { "c" : { "$gte" : 2, "$lt" : 5 } } } ]
+[jsTest] Query 149: [ { "$match" : { "c" : { "$gt" : 1, "$lt" : 5 } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1636,7 +1896,7 @@ histogramIdx: 4.87 AbsError: 0.87, RelError: 0.22, SelError: 4.35%
[jsTest] ----
-[jsTest] Query 129: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 2, "$lt" : 5 } } } } ]
+[jsTest] Query 150: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 1, "$lt" : 5 } } } } ]
[jsTest] ----
Actual cardinality: 4
@@ -1648,7 +1908,7 @@ histogramIdx: 5.72 AbsError: 1.72, RelError: 0.43, SelError: 8.6%
[jsTest] ----
-[jsTest] Query 130: [ { "$match" : { "c" : { "$gte" : 3, "$lte" : 9 } } } ]
+[jsTest] Query 151: [ { "$match" : { "c" : { "$gt" : 2, "$lte" : 9 } } } ]
[jsTest] ----
Actual cardinality: 9
@@ -1660,7 +1920,7 @@ histogramIdx: 10.44 AbsError: 1.44, RelError: 0.16, SelError: 7.2%
[jsTest] ----
-[jsTest] Query 131: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ]
+[jsTest] Query 152: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 2, "$lte" : 9 } } } } ]
[jsTest] ----
Actual cardinality: 9
@@ -1672,7 +1932,7 @@ histogramIdx: 17.97 AbsError: 8.97, RelError: 1, SelError: 44.85%
[jsTest] ----
-[jsTest] Query 132: [ { "$match" : { "c" : { "$gt" : 4, "$lt" : 15 } } } ]
+[jsTest] Query 153: [ { "$match" : { "c" : { "$gte" : 3, "$lt" : 15 } } } ]
[jsTest] ----
Actual cardinality: 10
@@ -1684,67 +1944,67 @@ histogramIdx: 11.38 AbsError: 1.38, RelError: 0.14, SelError: 6.9%
[jsTest] ----
-[jsTest] Query 133: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 4, "$lt" : 15 } } } } ]
+[jsTest] Query 154: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lt" : 15 } } } } ]
[jsTest] ----
Actual cardinality: 10
Cardinality estimates:
heuristic: 4.43 AbsError: -5.57, RelError: -0.56, SelError: -27.85%
heuristicIdx: 4.43 AbsError: -5.57, RelError: -0.56, SelError: -27.85%
-histogram: 15.52 AbsError: 5.52, RelError: 0.55, SelError: 27.6%
-histogramIdx: 15.52 AbsError: 5.52, RelError: 0.55, SelError: 27.6%
+histogram: 19.6 AbsError: 9.6, RelError: 0.96, SelError: 48%
+histogramIdx: 19.6 AbsError: 9.6, RelError: 0.96, SelError: 48%
[jsTest] ----
-[jsTest] Query 134: [ { "$match" : { "c" : { "$gt" : 5, "$lte" : 16 } } } ]
+[jsTest] Query 155: [ { "$match" : { "c" : { "$gte" : 5, "$lte" : 16 } } } ]
[jsTest] ----
-Actual cardinality: 11
+Actual cardinality: 13
Cardinality estimates:
-heuristic: 4.43 AbsError: -6.57, RelError: -0.6, SelError: -32.85%
-heuristicIdx: 4.43 AbsError: -6.57, RelError: -0.6, SelError: -32.85%
-histogram: 13.42 AbsError: 2.42, RelError: 0.22, SelError: 12.1%
-histogramIdx: 13.42 AbsError: 2.42, RelError: 0.22, SelError: 12.1%
+heuristic: 4.43 AbsError: -8.57, RelError: -0.66, SelError: -42.85%
+heuristicIdx: 4.43 AbsError: -8.57, RelError: -0.66, SelError: -42.85%
+histogram: 14.23 AbsError: 1.23, RelError: 0.09, SelError: 6.15%
+histogramIdx: 14.23 AbsError: 1.23, RelError: 0.09, SelError: 6.15%
[jsTest] ----
-[jsTest] Query 135: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 5, "$lte" : 16 } } } } ]
+[jsTest] Query 156: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 5, "$lte" : 16 } } } } ]
[jsTest] ----
-Actual cardinality: 11
+Actual cardinality: 13
Cardinality estimates:
-heuristic: 4.43 AbsError: -6.57, RelError: -0.6, SelError: -32.85%
-heuristicIdx: 4.43 AbsError: -6.57, RelError: -0.6, SelError: -32.85%
-histogram: 17.97 AbsError: 6.97, RelError: 0.63, SelError: 34.85%
-histogramIdx: 17.97 AbsError: 6.97, RelError: 0.63, SelError: 34.85%
+heuristic: 4.43 AbsError: -8.57, RelError: -0.66, SelError: -42.85%
+heuristicIdx: 4.43 AbsError: -8.57, RelError: -0.66, SelError: -42.85%
+histogram: 20 AbsError: 7, RelError: 0.54, SelError: 35%
+histogramIdx: 20 AbsError: 7, RelError: 0.54, SelError: 35%
[jsTest] ----
-[jsTest] Query 136: [ { "$match" : { "c" : { "$gte" : 9, "$lt" : 17 } } } ]
+[jsTest] Query 157: [ { "$match" : { "c" : { "$gt" : 9, "$lt" : 17 } } } ]
[jsTest] ----
-Actual cardinality: 7
+Actual cardinality: 5
Cardinality estimates:
-heuristic: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
-heuristicIdx: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
-histogram: 10.39 AbsError: 3.39, RelError: 0.48, SelError: 16.95%
-histogramIdx: 10.39 AbsError: 3.39, RelError: 0.48, SelError: 16.95%
+heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+histogram: 8.66 AbsError: 3.66, RelError: 0.73, SelError: 18.3%
+histogramIdx: 8.66 AbsError: 3.66, RelError: 0.73, SelError: 18.3%
[jsTest] ----
-[jsTest] Query 137: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 9, "$lt" : 17 } } } } ]
+[jsTest] Query 158: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 9, "$lt" : 17 } } } } ]
[jsTest] ----
-Actual cardinality: 7
+Actual cardinality: 5
Cardinality estimates:
-heuristic: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
-heuristicIdx: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
-histogram: 9.8 AbsError: 2.8, RelError: 0.4, SelError: 14%
-histogramIdx: 9.8 AbsError: 2.8, RelError: 0.4, SelError: 14%
+heuristic: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+heuristicIdx: 4.43 AbsError: -0.57, RelError: -0.11, SelError: -2.85%
+histogram: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
+histogramIdx: 7.35 AbsError: 2.35, RelError: 0.47, SelError: 11.75%
[jsTest] ----
-[jsTest] Query 138: [ { "$match" : { "c" : { "$gte" : 15, "$lte" : 18 } } } ]
+[jsTest] Query 159: [ { "$match" : { "c" : { "$gt" : 15, "$lte" : 18 } } } ]
[jsTest] ----
Actual cardinality: 7
@@ -1756,19 +2016,19 @@ histogramIdx: 8.54 AbsError: 1.54, RelError: 0.22, SelError: 7.7%
[jsTest] ----
-[jsTest] Query 139: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lte" : 18 } } } } ]
+[jsTest] Query 160: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 15, "$lte" : 18 } } } } ]
[jsTest] ----
Actual cardinality: 7
Cardinality estimates:
heuristic: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
heuristicIdx: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
-histogram: 14.7 AbsError: 7.7, RelError: 1.1, SelError: 38.5%
-histogramIdx: 14.7 AbsError: 7.7, RelError: 1.1, SelError: 38.5%
+histogram: 12.25 AbsError: 5.25, RelError: 0.75, SelError: 26.25%
+histogramIdx: 12.25 AbsError: 5.25, RelError: 0.75, SelError: 26.25%
[jsTest] ----
-[jsTest] Query 140: [ { "$match" : { "c" : { "$gt" : 16, "$lt" : 19 } } } ]
+[jsTest] Query 161: [ { "$match" : { "c" : { "$gte" : 16, "$lt" : 19 } } } ]
[jsTest] ----
Actual cardinality: 7
@@ -1780,43 +2040,79 @@ histogramIdx: 8.54 AbsError: 1.54, RelError: 0.22, SelError: 7.7%
[jsTest] ----
-[jsTest] Query 141: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 16, "$lt" : 19 } } } } ]
+[jsTest] Query 162: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lt" : 19 } } } } ]
[jsTest] ----
Actual cardinality: 7
Cardinality estimates:
heuristic: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
heuristicIdx: 4.43 AbsError: -2.57, RelError: -0.37, SelError: -12.85%
-histogram: 8.99 AbsError: 1.99, RelError: 0.28, SelError: 9.95%
-histogramIdx: 8.99 AbsError: 1.99, RelError: 0.28, SelError: 9.95%
+histogram: 12.25 AbsError: 5.25, RelError: 0.75, SelError: 26.25%
+histogramIdx: 12.25 AbsError: 5.25, RelError: 0.75, SelError: 26.25%
[jsTest] ----
-[jsTest] Query 142: [ { "$match" : { "c" : { "$gt" : 17, "$lte" : 20 } } } ]
+[jsTest] Query 163: [ { "$match" : { "c" : { "$gte" : 17, "$lte" : 20 } } } ]
[jsTest] ----
-Actual cardinality: 8
+Actual cardinality: 9
Cardinality estimates:
-heuristic: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-heuristicIdx: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-histogram: 8 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 8 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+heuristicIdx: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+histogram: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 143: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 17, "$lte" : 20 } } } } ]
+[jsTest] Query 164: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 17, "$lte" : 20 } } } } ]
[jsTest] ----
-Actual cardinality: 8
+Actual cardinality: 9
Cardinality estimates:
-heuristic: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-heuristicIdx: 4.43 AbsError: -3.57, RelError: -0.45, SelError: -17.85%
-histogram: 12.25 AbsError: 4.25, RelError: 0.53, SelError: 21.25%
-histogramIdx: 12.25 AbsError: 4.25, RelError: 0.53, SelError: 21.25%
+heuristic: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+heuristicIdx: 4.43 AbsError: -4.57, RelError: -0.51, SelError: -22.85%
+histogram: 16.34 AbsError: 7.34, RelError: 0.82, SelError: 36.7%
+histogramIdx: 16.34 AbsError: 7.34, RelError: 0.82, SelError: 36.7%
[jsTest] ----
-[jsTest] Query 144: [ { "$match" : { "mixed" : { "$eq" : 0 } } } ]
+[jsTest] Query 165: [ { "$match" : { "c" : { "$gt" : 18, "$lt" : 21 } } } ]
+[jsTest] ----
+
+Actual cardinality: 6
+Cardinality estimates:
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 6 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 166: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 18, "$lt" : 21 } } } } ]
+[jsTest] ----
+
+Actual cardinality: 6
+Cardinality estimates:
+heuristic: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+heuristicIdx: 4.43 AbsError: -1.57, RelError: -0.26, SelError: -7.85%
+histogram: 7.35 AbsError: 1.35, RelError: 0.22, SelError: 6.75%
+histogramIdx: 7.35 AbsError: 1.35, RelError: 0.22, SelError: 6.75%
+
+
+[jsTest] ----
+[jsTest] Query 167: [ { "$match" : { "mixed" : { "$eq" : -1 } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+heuristicIdx: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 168: [ { "$match" : { "mixed" : { "$eq" : 0 } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -1828,91 +2124,127 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 145: [ { "$match" : { "mixed" : { "$eq" : 22 } } } ]
+[jsTest] Query 169: [ { "$match" : { "mixed" : { "$lt" : 0 } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 170: [ { "$match" : { "mixed" : { "$lte" : 0 } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
-heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
+heuristic: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 146: [ { "$match" : { "mixed" : { "$lt" : 22 } } } ]
+[jsTest] Query 171: [ { "$match" : { "mixed" : { "$gt" : 0 } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 9
Cardinality estimates:
-heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 0, RelError: 0, SelError: 0%
+heuristicIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogram: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 147: [ { "$match" : { "mixed" : { "$lte" : 22 } } } ]
+[jsTest] Query 172: [ { "$match" : { "mixed" : { "$gte" : 0 } } } ]
[jsTest] ----
-Actual cardinality: 3
+Actual cardinality: 10
Cardinality estimates:
-heuristic: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
-histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: -1, RelError: -0.1, SelError: -5%
+heuristicIdx: 9 AbsError: -1, RelError: -0.1, SelError: -5%
+histogram: 10 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 10 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 148: [ { "$match" : { "mixed" : { "$gt" : 22 } } } ]
+[jsTest] Query 173: [ { "$match" : { "mixed" : { "$lt" : 22 } } } ]
[jsTest] ----
-Actual cardinality: 7
+Actual cardinality: 2
Cardinality estimates:
-heuristic: 9 AbsError: 2, RelError: 0.29, SelError: 10%
-heuristicIdx: 9 AbsError: 2, RelError: 0.29, SelError: 10%
-histogram: 7 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 7 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 149: [ { "$match" : { "mixed" : { "$gte" : 22 } } } ]
+[jsTest] Query 174: [ { "$match" : { "mixed" : { "$lte" : 77 } } } ]
[jsTest] ----
Actual cardinality: 8
Cardinality estimates:
-heuristic: 9 AbsError: 1, RelError: 0.13, SelError: 5%
-heuristicIdx: 9 AbsError: 1, RelError: 0.13, SelError: 5%
+heuristic: 6.6 AbsError: -1.4, RelError: -0.18, SelError: -7%
+heuristicIdx: 6.6 AbsError: -1.4, RelError: -0.18, SelError: -7%
histogram: 8 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 8 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 150: [ { "$match" : { "mixed" : { "$lt" : 77 } } } ]
+[jsTest] Query 175: [ { "$match" : { "mixed" : { "$gt" : "cde" } } } ]
[jsTest] ----
-Actual cardinality: 7
+Actual cardinality: 9
Cardinality estimates:
-heuristic: 6.6 AbsError: -0.4, RelError: -0.06, SelError: -2%
-heuristicIdx: 6.6 AbsError: -0.4, RelError: -0.06, SelError: -2%
-histogram: 7 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 7 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 0, RelError: 0, SelError: 0%
+heuristicIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogram: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 151: [ { "$match" : { "mixed" : { "$lte" : "cde" } } } ]
+[jsTest] Query 176: [ { "$match" : { "mixed" : { "$eq" : "gh" } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
-heuristic: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
+heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 152: [ { "$match" : { "mixed" : { "$gt" : "gh" } } } ]
+[jsTest] Query 177: [ { "$match" : { "mixed" : { "$lt" : "gh" } } } ]
+[jsTest] ----
+
+Actual cardinality: 2
+Cardinality estimates:
+heuristic: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
+histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 178: [ { "$match" : { "mixed" : { "$lte" : "gh" } } } ]
+[jsTest] ----
+
+Actual cardinality: 3
+Cardinality estimates:
+heuristic: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
+heuristicIdx: 6.6 AbsError: 3.6, RelError: 1.2, SelError: 18%
+histogram: 3 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 3 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 179: [ { "$match" : { "mixed" : { "$gt" : "gh" } } } ]
[jsTest] ----
Actual cardinality: 7
@@ -1924,7 +2256,31 @@ histogramIdx: 7 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 153: [ { "$match" : { "mixed" : { "$eq" : "mno" } } } ]
+[jsTest] Query 180: [ { "$match" : { "mixed" : { "$gte" : "gh" } } } ]
+[jsTest] ----
+
+Actual cardinality: 8
+Cardinality estimates:
+heuristic: 9 AbsError: 1, RelError: 0.13, SelError: 5%
+heuristicIdx: 9 AbsError: 1, RelError: 0.13, SelError: 5%
+histogram: 8 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 8 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 181: [ { "$match" : { "mixed" : { "$gte" : "mno" } } } ]
+[jsTest] ----
+
+Actual cardinality: 5
+Cardinality estimates:
+heuristic: 9 AbsError: 4, RelError: 0.8, SelError: 20%
+heuristicIdx: 9 AbsError: 4, RelError: 0.8, SelError: 20%
+histogram: 5 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 5 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 182: [ { "$match" : { "mixed" : { "$eq" : "u" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -1936,79 +2292,79 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 154: [ { "$match" : { "mixed" : { "$lt" : "mno" } } } ]
+[jsTest] Query 183: [ { "$match" : { "mixed" : { "$lt" : "yzab" } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 9
Cardinality estimates:
-heuristic: 6.6 AbsError: 1.6, RelError: 0.32, SelError: 8%
-heuristicIdx: 6.6 AbsError: 1.6, RelError: 0.32, SelError: 8%
-histogram: 5 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 5 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -2.4, RelError: -0.27, SelError: -12%
+heuristicIdx: 6.6 AbsError: -2.4, RelError: -0.27, SelError: -12%
+histogram: 9 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 9 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 155: [ { "$match" : { "mixed" : { "$lte" : "mno" } } } ]
+[jsTest] Query 184: [ { "$match" : { "mixed" : { "$eq" : "yzbb" } } } ]
[jsTest] ----
-Actual cardinality: 6
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 6.6 AbsError: 0.6, RelError: 0.1, SelError: 3%
-heuristicIdx: 6.6 AbsError: 0.6, RelError: 0.1, SelError: 3%
-histogram: 6 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 6 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+heuristicIdx: 4.47 AbsError: 4.47, RelError: 0.45, SelError: 22.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 156: [ { "$match" : { "mixed" : { "$gt" : "mno" } } } ]
+[jsTest] Query 185: [ { "$match" : { "mixed" : { "$lt" : "yzbb" } } } ]
[jsTest] ----
-Actual cardinality: 4
+Actual cardinality: 10
Cardinality estimates:
-heuristic: 9 AbsError: 5, RelError: 1.25, SelError: 25%
-heuristicIdx: 9 AbsError: 5, RelError: 1.25, SelError: 25%
-histogram: 4 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 4 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -3.4, RelError: -0.34, SelError: -17%
+heuristicIdx: 6.6 AbsError: -3.4, RelError: -0.34, SelError: -17%
+histogram: 10 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 10 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 157: [ { "$match" : { "mixed" : { "$gte" : "mno" } } } ]
+[jsTest] Query 186: [ { "$match" : { "mixed" : { "$lte" : "yzbb" } } } ]
[jsTest] ----
-Actual cardinality: 5
+Actual cardinality: 10
Cardinality estimates:
-heuristic: 9 AbsError: 4, RelError: 0.8, SelError: 20%
-heuristicIdx: 9 AbsError: 4, RelError: 0.8, SelError: 20%
-histogram: 5 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 5 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 6.6 AbsError: -3.4, RelError: -0.34, SelError: -17%
+heuristicIdx: 6.6 AbsError: -3.4, RelError: -0.34, SelError: -17%
+histogram: 10 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 10 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 158: [ { "$match" : { "mixed" : { "$gte" : "u" } } } ]
+[jsTest] Query 187: [ { "$match" : { "mixed" : { "$gt" : "yzbb" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-heuristicIdx: 9 AbsError: 7, RelError: 3.5, SelError: 35%
-histogram: 2 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+heuristicIdx: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 159: [ { "$match" : { "mixed" : { "$eq" : "yzab" } } } ]
+[jsTest] Query 188: [ { "$match" : { "mixed" : { "$gte" : "yzbb" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-heuristicIdx: 4.47 AbsError: 3.47, RelError: 3.47, SelError: 17.35%
-histogram: 1 AbsError: 0, RelError: 0, SelError: 0%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+heuristicIdx: 9 AbsError: 9, RelError: 0.9, SelError: 45%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 160: [ { "$match" : { "mixed" : { "$gt" : "cde", "$lt" : "cdf" } } } ]
+[jsTest] Query 189: [ { "$match" : { "mixed" : { "$gt" : "cde", "$lt" : "cdf" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -2020,7 +2376,7 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 161: [ { "$match" : { "mixed" : { "$gt" : "gh", "$lte" : "gi" } } } ]
+[jsTest] Query 190: [ { "$match" : { "mixed" : { "$gt" : "gh", "$lte" : "gi" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -2032,7 +2388,7 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 162: [ { "$match" : { "mixed" : { "$gte" : "mno", "$lt" : "mnp" } } } ]
+[jsTest] Query 191: [ { "$match" : { "mixed" : { "$gte" : "mno", "$lt" : "mnp" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -2044,7 +2400,7 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 163: [ { "$match" : { "mixed" : { "$gte" : "u", "$lte" : "v" } } } ]
+[jsTest] Query 192: [ { "$match" : { "mixed" : { "$gte" : "u", "$lte" : "v" } } } ]
[jsTest] ----
Actual cardinality: 1
@@ -2056,7 +2412,7 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 164: [ { "$match" : { "mixed" : { "$gt" : "yzab", "$lt" : "yzbb" } } } ]
+[jsTest] Query 193: [ { "$match" : { "mixed" : { "$gt" : "yzab", "$lt" : "yzbb" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -2068,43 +2424,55 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 165: [ { "$match" : { "mixed" : { "$gt" : "cde", "$lte" : "cfe" } } } ]
+[jsTest] Query 194: [ { "$match" : { "mixed" : { "$gt" : "yzbb", "$lte" : "yzcb" } } } ]
[jsTest] ----
Actual cardinality: 0
Cardinality estimates:
heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
-histogram: 0.67 AbsError: 0.67, RelError: 0.07, SelError: 3.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 166: [ { "$match" : { "mixed" : { "$gte" : "gh", "$lt" : "gj" } } } ]
+[jsTest] Query 195: [ { "$match" : { "mixed" : { "$gte" : "cde", "$lt" : "cfe" } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 1.9 AbsError: 0.9, RelError: 0.9, SelError: 4.5%
+histogram: 0.71 AbsError: -0.29, RelError: -0.29, SelError: -1.45%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 167: [ { "$match" : { "mixed" : { "$gte" : "mno", "$lte" : "mpo" } } } ]
+[jsTest] Query 196: [ { "$match" : { "mixed" : { "$gte" : "gh", "$lte" : "gj" } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 2.74 AbsError: 1.74, RelError: 1.74, SelError: 8.7%
+histogram: 1.9 AbsError: 0.9, RelError: 0.9, SelError: 4.5%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 168: [ { "$match" : { "mixed" : { "$gt" : "u", "$lt" : "w" } } } ]
+[jsTest] Query 197: [ { "$match" : { "mixed" : { "$gt" : "mno", "$lt" : "mpo" } } } ]
+[jsTest] ----
+
+Actual cardinality: 0
+Cardinality estimates:
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 2.19 AbsError: 2.19, RelError: 0.22, SelError: 10.95%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 198: [ { "$match" : { "mixed" : { "$gt" : "u", "$lte" : "w" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -2116,7 +2484,19 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 169: [ { "$match" : { "mixed" : { "$gt" : "yzab", "$lte" : "y|ab" } } } ]
+[jsTest] Query 199: [ { "$match" : { "mixed" : { "$gte" : "yzab", "$lt" : "y|ab" } } } ]
+[jsTest] ----
+
+Actual cardinality: 1
+Cardinality estimates:
+heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+histogram: 0.71 AbsError: -0.29, RelError: -0.29, SelError: -1.45%
+histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 200: [ { "$match" : { "mixed" : { "$gte" : "yzbb", "$lte" : "y|bb" } } } ]
[jsTest] ----
Actual cardinality: 0
@@ -2128,63 +2508,75 @@ histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 170: [ { "$match" : { "mixed" : { "$gte" : "cde", "$lt" : "fde" } } } ]
+[jsTest] Query 201: [ { "$match" : { "mixed" : { "$gt" : "cde", "$lt" : "fde" } } } ]
[jsTest] ----
-Actual cardinality: 2
+Actual cardinality: 1
Cardinality estimates:
-heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
-heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 1.41 AbsError: -0.59, RelError: -0.3, SelError: -2.95%
-histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+histogram: 1.34 AbsError: 0.34, RelError: 0.34, SelError: 1.7%
+histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 171: [ { "$match" : { "mixed" : { "$gte" : "gh", "$lte" : "jh" } } } ]
+[jsTest] Query 202: [ { "$match" : { "mixed" : { "$gt" : "gh", "$lte" : "jh" } } } ]
+[jsTest] ----
+
+Actual cardinality: 1
+Cardinality estimates:
+heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
+heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
+histogram: 2.37 AbsError: 1.37, RelError: 1.37, SelError: 6.85%
+histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+
+
+[jsTest] ----
+[jsTest] Query 203: [ { "$match" : { "mixed" : { "$gte" : "mno", "$lt" : "pno" } } } ]
[jsTest] ----
Actual cardinality: 2
Cardinality estimates:
heuristic: 4.43 AbsError: 2.43, RelError: 1.21, SelError: 12.15%
heuristicIdx: 6.6 AbsError: 4.6, RelError: 2.3, SelError: 23%
-histogram: 2.53 AbsError: 0.53, RelError: 0.26, SelError: 2.65%
+histogram: 2.96 AbsError: 0.96, RelError: 0.48, SelError: 4.8%
histogramIdx: 2 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 172: [ { "$match" : { "mixed" : { "$gt" : "mno", "$lt" : "pno" } } } ]
+[jsTest] Query 204: [ { "$match" : { "mixed" : { "$gte" : "u", "$lte" : "x" } } } ]
[jsTest] ----
Actual cardinality: 1
Cardinality estimates:
heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 2.37 AbsError: 1.37, RelError: 1.37, SelError: 6.85%
+histogram: 1.34 AbsError: 0.34, RelError: 0.34, SelError: 1.7%
histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 173: [ { "$match" : { "mixed" : { "$gt" : "u", "$lte" : "x" } } } ]
+[jsTest] Query 205: [ { "$match" : { "mixed" : { "$gt" : "yzab", "$lt" : "|zab" } } } ]
[jsTest] ----
Actual cardinality: 0
Cardinality estimates:
heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
-histogram: 0.67 AbsError: 0.67, RelError: 0.07, SelError: 3.35%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
-[jsTest] Query 174: [ { "$match" : { "mixed" : { "$gte" : "yzab", "$lt" : "|zab" } } } ]
+[jsTest] Query 206: [ { "$match" : { "mixed" : { "$gt" : "yzbb", "$lte" : "|zbb" } } } ]
[jsTest] ----
-Actual cardinality: 1
+Actual cardinality: 0
Cardinality estimates:
-heuristic: 4.43 AbsError: 3.43, RelError: 3.43, SelError: 17.15%
-heuristicIdx: 6.6 AbsError: 5.6, RelError: 5.6, SelError: 28%
-histogram: 0.71 AbsError: -0.29, RelError: -0.29, SelError: -1.45%
-histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
+heuristic: 4.43 AbsError: 4.43, RelError: 0.44, SelError: 22.15%
+heuristicIdx: 6.6 AbsError: 6.6, RelError: 0.66, SelError: 33%
+histogram: 0 AbsError: 0, RelError: 0, SelError: 0%
+histogramIdx: 0 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
@@ -2192,41 +2584,41 @@ histogramIdx: 1 AbsError: 0, RelError: 0, SelError: 0%
[jsTest] ----
heuristic:
-{ "category" : "$eq", "queryCount" : 16, "RMSAbsError" : 3.055, "RMSRelError" : 2.913, "meanSelError" : 14.556 }
-{ "category" : "$gt", "queryCount" : 14, "RMSAbsError" : 6.256, "RMSRelError" : 2.567, "meanSelError" : 27.857 }
-{ "category" : "$gte", "queryCount" : 13, "RMSAbsError" : 6.421, "RMSRelError" : 2.859, "meanSelError" : 27.692 }
-{ "category" : "$lt", "queryCount" : 14, "RMSAbsError" : 6.098, "RMSRelError" : 1.319, "meanSelError" : 25.286 }
-{ "category" : "$lte", "queryCount" : 14, "RMSAbsError" : 7.305, "RMSRelError" : 1.679, "meanSelError" : 30.714 }
-{ "category" : "large range", "queryCount" : 38, "RMSAbsError" : 3.322, "RMSRelError" : 1.509, "meanSelError" : 14.645 }
-{ "category" : "medium range", "queryCount" : 32, "RMSAbsError" : 3.313, "RMSRelError" : 1.546, "meanSelError" : 13.194 }
-{ "category" : "small range", "queryCount" : 34, "RMSAbsError" : 2.761, "RMSRelError" : 1.828, "meanSelError" : 11.579 }
+{ "category" : "$eq", "queryCount" : 19, "RMSAbsError" : 3.547, "RMSRelError" : 2.422, "meanSelError" : 16.839 }
+{ "category" : "$gt", "queryCount" : 16, "RMSAbsError" : 6.461, "RMSRelError" : 1.012, "meanSelError" : 25.625 }
+{ "category" : "$gte", "queryCount" : 16, "RMSAbsError" : 6.874, "RMSRelError" : 1.234, "meanSelError" : 28.125 }
+{ "category" : "$lt", "queryCount" : 19, "RMSAbsError" : 7.671, "RMSRelError" : 1.278, "meanSelError" : 34.579 }
+{ "category" : "$lte", "queryCount" : 16, "RMSAbsError" : 7.174, "RMSRelError" : 2.545, "meanSelError" : 30.5 }
+{ "category" : "large range", "queryCount" : 45, "RMSAbsError" : 3.629, "RMSRelError" : 1.475, "meanSelError" : 15.51 }
+{ "category" : "medium range", "queryCount" : 37, "RMSAbsError" : 3.006, "RMSRelError" : 1.253, "meanSelError" : 13.226 }
+{ "category" : "small range", "queryCount" : 39, "RMSAbsError" : 2.875, "RMSRelError" : 1.344, "meanSelError" : 11.909 }
heuristicIdx:
-{ "category" : "$eq", "queryCount" : 16, "RMSAbsError" : 3.055, "RMSRelError" : 2.913, "meanSelError" : 14.556 }
-{ "category" : "$gt", "queryCount" : 14, "RMSAbsError" : 6.256, "RMSRelError" : 2.567, "meanSelError" : 27.857 }
-{ "category" : "$gte", "queryCount" : 13, "RMSAbsError" : 6.421, "RMSRelError" : 2.859, "meanSelError" : 27.692 }
-{ "category" : "$lt", "queryCount" : 14, "RMSAbsError" : 6.098, "RMSRelError" : 1.319, "meanSelError" : 25.286 }
-{ "category" : "$lte", "queryCount" : 14, "RMSAbsError" : 7.305, "RMSRelError" : 1.679, "meanSelError" : 30.714 }
-{ "category" : "large range", "queryCount" : 38, "RMSAbsError" : 4.431, "RMSRelError" : 2.509, "meanSelError" : 20.355 }
-{ "category" : "medium range", "queryCount" : 32, "RMSAbsError" : 4.328, "RMSRelError" : 2.478, "meanSelError" : 17.262 }
-{ "category" : "small range", "queryCount" : 34, "RMSAbsError" : 3.879, "RMSRelError" : 2.825, "meanSelError" : 15.409 }
+{ "category" : "$eq", "queryCount" : 19, "RMSAbsError" : 3.547, "RMSRelError" : 2.422, "meanSelError" : 16.839 }
+{ "category" : "$gt", "queryCount" : 16, "RMSAbsError" : 6.461, "RMSRelError" : 1.012, "meanSelError" : 25.625 }
+{ "category" : "$gte", "queryCount" : 16, "RMSAbsError" : 6.874, "RMSRelError" : 1.234, "meanSelError" : 28.125 }
+{ "category" : "$lt", "queryCount" : 19, "RMSAbsError" : 7.671, "RMSRelError" : 1.278, "meanSelError" : 34.579 }
+{ "category" : "$lte", "queryCount" : 16, "RMSAbsError" : 7.174, "RMSRelError" : 2.545, "meanSelError" : 30.5 }
+{ "category" : "large range", "queryCount" : 45, "RMSAbsError" : 4.815, "RMSRelError" : 2.439, "meanSelError" : 21.538 }
+{ "category" : "medium range", "queryCount" : 37, "RMSAbsError" : 4.191, "RMSRelError" : 2.013, "meanSelError" : 17.624 }
+{ "category" : "small range", "queryCount" : 39, "RMSAbsError" : 4.058, "RMSRelError" : 2.137, "meanSelError" : 16.082 }
histogram:
-{ "category" : "$eq", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$gt", "queryCount" : 14, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$gte", "queryCount" : 13, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$lt", "queryCount" : 14, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$lte", "queryCount" : 14, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "large range", "queryCount" : 38, "RMSAbsError" : 3.324, "RMSRelError" : 1.463, "meanSelError" : 11.626 }
-{ "category" : "medium range", "queryCount" : 32, "RMSAbsError" : 2.763, "RMSRelError" : 1.166, "meanSelError" : 10.002 }
-{ "category" : "small range", "queryCount" : 34, "RMSAbsError" : 2.288, "RMSRelError" : 1.575, "meanSelError" : 8.347 }
+{ "category" : "$eq", "queryCount" : 19, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$gt", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$gte", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$lt", "queryCount" : 19, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$lte", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "large range", "queryCount" : 45, "RMSAbsError" : 3.349, "RMSRelError" : 1.414, "meanSelError" : 10.551 }
+{ "category" : "medium range", "queryCount" : 37, "RMSAbsError" : 2.695, "RMSRelError" : 0.529, "meanSelError" : 8.719 }
+{ "category" : "small range", "queryCount" : 39, "RMSAbsError" : 2.137, "RMSRelError" : 1.166, "meanSelError" : 7.046 }
histogramIdx:
-{ "category" : "$eq", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$gt", "queryCount" : 14, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$gte", "queryCount" : 13, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$lt", "queryCount" : 14, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "$lte", "queryCount" : 14, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "large range", "queryCount" : 38, "RMSAbsError" : 2.725, "RMSRelError" : 0.337, "meanSelError" : 7.249 }
-{ "category" : "medium range", "queryCount" : 32, "RMSAbsError" : 2.241, "RMSRelError" : 0.393, "meanSelError" : 6.869 }
-{ "category" : "small range", "queryCount" : 34, "RMSAbsError" : 1.668, "RMSRelError" : 0.49, "meanSelError" : 5.209 }
+{ "category" : "$eq", "queryCount" : 19, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$gt", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$gte", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$lt", "queryCount" : 19, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "$lte", "queryCount" : 16, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "large range", "queryCount" : 45, "RMSAbsError" : 2.852, "RMSRelError" : 0.342, "meanSelError" : 6.821 }
+{ "category" : "medium range", "queryCount" : 37, "RMSAbsError" : 2.243, "RMSRelError" : 0.345, "meanSelError" : 6.061 }
+{ "category" : "small range", "queryCount" : 39, "RMSAbsError" : 1.579, "RMSRelError" : 0.411, "meanSelError" : 4.405 }
[jsTest] ----
@@ -2234,25 +2626,25 @@ histogramIdx:
[jsTest] ----
heuristic:
-{ "category" : "a", "queryCount" : 24, "RMSAbsError" : 5.338, "RMSRelError" : 2.294, "meanSelError" : 22.733 }
-{ "category" : "b", "queryCount" : 36, "RMSAbsError" : 5.316, "RMSRelError" : 3.032, "meanSelError" : 22.95 }
-{ "category" : "c", "queryCount" : 84, "RMSAbsError" : 4.074, "RMSRelError" : 0.705, "meanSelError" : 14.629 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 3.748, "RMSRelError" : 2.382, "meanSelError" : 17.376 }
+{ "category" : "a", "queryCount" : 32, "RMSAbsError" : 6.313, "RMSRelError" : 1.881, "meanSelError" : 25.914 }
+{ "category" : "b", "queryCount" : 44, "RMSAbsError" : 5.434, "RMSRelError" : 2.058, "meanSelError" : 23.51 }
+{ "category" : "c", "queryCount" : 91, "RMSAbsError" : 4.169, "RMSRelError" : 0.607, "meanSelError" : 14.94 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 4.177, "RMSRelError" : 2.124, "meanSelError" : 18.836 }
heuristicIdx:
-{ "category" : "a", "queryCount" : 24, "RMSAbsError" : 5.826, "RMSRelError" : 2.898, "meanSelError" : 26.35 }
-{ "category" : "b", "queryCount" : 36, "RMSAbsError" : 6.233, "RMSRelError" : 3.941, "meanSelError" : 29.279 }
-{ "category" : "c", "queryCount" : 84, "RMSAbsError" : 4.074, "RMSRelError" : 0.705, "meanSelError" : 14.629 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 4.922, "RMSRelError" : 3.125, "meanSelError" : 22.626 }
+{ "category" : "a", "queryCount" : 32, "RMSAbsError" : 6.731, "RMSRelError" : 2.326, "meanSelError" : 29.305 }
+{ "category" : "b", "queryCount" : 44, "RMSAbsError" : 6.438, "RMSRelError" : 2.749, "meanSelError" : 30.168 }
+{ "category" : "c", "queryCount" : 91, "RMSAbsError" : 4.169, "RMSRelError" : 0.607, "meanSelError" : 14.94 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 5.209, "RMSRelError" : 2.929, "meanSelError" : 23.719 }
histogram:
-{ "category" : "a", "queryCount" : 24, "RMSAbsError" : 1.878, "RMSRelError" : 1.225, "meanSelError" : 3.904 }
-{ "category" : "b", "queryCount" : 36, "RMSAbsError" : 2.388, "RMSRelError" : 2.018, "meanSelError" : 6.107 }
-{ "category" : "c", "queryCount" : 84, "RMSAbsError" : 2.53, "RMSRelError" : 0.456, "meanSelError" : 8.004 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 0.684, "RMSRelError" : 0.543, "meanSelError" : 1.927 }
+{ "category" : "a", "queryCount" : 32, "RMSAbsError" : 1.607, "RMSRelError" : 1.171, "meanSelError" : 2.925 }
+{ "category" : "b", "queryCount" : 44, "RMSAbsError" : 2.151, "RMSRelError" : 1.404, "meanSelError" : 4.915 }
+{ "category" : "c", "queryCount" : 91, "RMSAbsError" : 2.672, "RMSRelError" : 0.422, "meanSelError" : 7.725 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 0.632, "RMSRelError" : 0.405, "meanSelError" : 1.484 }
histogramIdx:
-{ "category" : "a", "queryCount" : 24, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "b", "queryCount" : 36, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "c", "queryCount" : 84, "RMSAbsError" : 2.53, "RMSRelError" : 0.456, "meanSelError" : 8.004 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "a", "queryCount" : 32, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "b", "queryCount" : 44, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "c", "queryCount" : 91, "RMSAbsError" : 2.672, "RMSRelError" : 0.422, "meanSelError" : 7.725 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
[jsTest] ----
@@ -2260,24 +2652,24 @@ histogramIdx:
[jsTest] ----
heuristic:
-{ "_id" : "a", "RMSAbsErr" : 5.338, "RMSRelErr" : 2.294, "meanSelErr" : 22.733 }
-{ "_id" : "b", "RMSAbsErr" : 5.316, "RMSRelErr" : 3.032, "meanSelErr" : 22.95 }
-{ "_id" : "c", "RMSAbsErr" : 4.074, "RMSRelErr" : 0.705, "meanSelErr" : 14.629 }
-{ "_id" : "mixed", "RMSAbsErr" : 3.748, "RMSRelErr" : 2.382, "meanSelErr" : 17.376 }
+{ "_id" : "a", "RMSAbsErr" : 6.313, "RMSRelErr" : 1.881, "meanSelErr" : 25.914 }
+{ "_id" : "b", "RMSAbsErr" : 5.434, "RMSRelErr" : 2.058, "meanSelErr" : 23.51 }
+{ "_id" : "c", "RMSAbsErr" : 4.169, "RMSRelErr" : 0.607, "meanSelErr" : 14.94 }
+{ "_id" : "mixed", "RMSAbsErr" : 4.177, "RMSRelErr" : 2.124, "meanSelErr" : 18.836 }
heuristicIdx:
-{ "_id" : "a", "RMSAbsErr" : 5.826, "RMSRelErr" : 2.898, "meanSelErr" : 26.35 }
-{ "_id" : "b", "RMSAbsErr" : 6.233, "RMSRelErr" : 3.941, "meanSelErr" : 29.279 }
-{ "_id" : "c", "RMSAbsErr" : 4.074, "RMSRelErr" : 0.705, "meanSelErr" : 14.629 }
-{ "_id" : "mixed", "RMSAbsErr" : 4.922, "RMSRelErr" : 3.125, "meanSelErr" : 22.626 }
+{ "_id" : "a", "RMSAbsErr" : 6.731, "RMSRelErr" : 2.326, "meanSelErr" : 29.305 }
+{ "_id" : "b", "RMSAbsErr" : 6.438, "RMSRelErr" : 2.749, "meanSelErr" : 30.168 }
+{ "_id" : "c", "RMSAbsErr" : 4.169, "RMSRelErr" : 0.607, "meanSelErr" : 14.94 }
+{ "_id" : "mixed", "RMSAbsErr" : 5.209, "RMSRelErr" : 2.929, "meanSelErr" : 23.719 }
histogram:
-{ "_id" : "a", "RMSAbsErr" : 1.878, "RMSRelErr" : 1.225, "meanSelErr" : 3.904 }
-{ "_id" : "b", "RMSAbsErr" : 2.388, "RMSRelErr" : 2.018, "meanSelErr" : 6.107 }
-{ "_id" : "c", "RMSAbsErr" : 2.53, "RMSRelErr" : 0.456, "meanSelErr" : 8.004 }
-{ "_id" : "mixed", "RMSAbsErr" : 0.684, "RMSRelErr" : 0.543, "meanSelErr" : 1.927 }
+{ "_id" : "a", "RMSAbsErr" : 1.607, "RMSRelErr" : 1.171, "meanSelErr" : 2.925 }
+{ "_id" : "b", "RMSAbsErr" : 2.151, "RMSRelErr" : 1.404, "meanSelErr" : 4.915 }
+{ "_id" : "c", "RMSAbsErr" : 2.672, "RMSRelErr" : 0.422, "meanSelErr" : 7.725 }
+{ "_id" : "mixed", "RMSAbsErr" : 0.632, "RMSRelErr" : 0.405, "meanSelErr" : 1.484 }
histogramIdx:
{ "_id" : "a", "RMSAbsErr" : 0, "RMSRelErr" : 0, "meanSelErr" : 0 }
{ "_id" : "b", "RMSAbsErr" : 0, "RMSRelErr" : 0, "meanSelErr" : 0 }
-{ "_id" : "c", "RMSAbsErr" : 2.53, "RMSRelErr" : 0.456, "meanSelErr" : 8.004 }
+{ "_id" : "c", "RMSAbsErr" : 2.672, "RMSRelErr" : 0.422, "meanSelErr" : 7.725 }
{ "_id" : "mixed", "RMSAbsErr" : 0, "RMSRelErr" : 0, "meanSelErr" : 0 }
@@ -2286,138 +2678,148 @@ histogramIdx:
[jsTest] ----
heuristic:
-{ "category" : "array", "queryCount" : 84, "RMSAbsError" : 4.074, "RMSRelError" : 0.705, "meanSelError" : 14.629 }
-{ "category" : "integer", "queryCount" : 24, "RMSAbsError" : 5.338, "RMSRelError" : 2.294, "meanSelError" : 22.733 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 3.748, "RMSRelError" : 2.382, "meanSelError" : 17.376 }
-{ "category" : "string", "queryCount" : 36, "RMSAbsError" : 5.316, "RMSRelError" : 3.032, "meanSelError" : 22.95 }
+{ "category" : "array", "queryCount" : 91, "RMSAbsError" : 4.169, "RMSRelError" : 0.607, "meanSelError" : 14.94 }
+{ "category" : "integer", "queryCount" : 32, "RMSAbsError" : 6.313, "RMSRelError" : 1.881, "meanSelError" : 25.914 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 4.177, "RMSRelError" : 2.124, "meanSelError" : 18.836 }
+{ "category" : "string", "queryCount" : 44, "RMSAbsError" : 5.434, "RMSRelError" : 2.058, "meanSelError" : 23.51 }
heuristicIdx:
-{ "category" : "array", "queryCount" : 84, "RMSAbsError" : 4.074, "RMSRelError" : 0.705, "meanSelError" : 14.629 }
-{ "category" : "integer", "queryCount" : 24, "RMSAbsError" : 5.826, "RMSRelError" : 2.898, "meanSelError" : 26.35 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 4.922, "RMSRelError" : 3.125, "meanSelError" : 22.626 }
-{ "category" : "string", "queryCount" : 36, "RMSAbsError" : 6.233, "RMSRelError" : 3.941, "meanSelError" : 29.279 }
+{ "category" : "array", "queryCount" : 91, "RMSAbsError" : 4.169, "RMSRelError" : 0.607, "meanSelError" : 14.94 }
+{ "category" : "integer", "queryCount" : 32, "RMSAbsError" : 6.731, "RMSRelError" : 2.326, "meanSelError" : 29.305 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 5.209, "RMSRelError" : 2.929, "meanSelError" : 23.719 }
+{ "category" : "string", "queryCount" : 44, "RMSAbsError" : 6.438, "RMSRelError" : 2.749, "meanSelError" : 30.168 }
histogram:
-{ "category" : "array", "queryCount" : 84, "RMSAbsError" : 2.53, "RMSRelError" : 0.456, "meanSelError" : 8.004 }
-{ "category" : "integer", "queryCount" : 24, "RMSAbsError" : 1.878, "RMSRelError" : 1.225, "meanSelError" : 3.904 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 0.684, "RMSRelError" : 0.543, "meanSelError" : 1.927 }
-{ "category" : "string", "queryCount" : 36, "RMSAbsError" : 2.388, "RMSRelError" : 2.018, "meanSelError" : 6.107 }
+{ "category" : "array", "queryCount" : 91, "RMSAbsError" : 2.672, "RMSRelError" : 0.422, "meanSelError" : 7.725 }
+{ "category" : "integer", "queryCount" : 32, "RMSAbsError" : 1.607, "RMSRelError" : 1.171, "meanSelError" : 2.925 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 0.632, "RMSRelError" : 0.405, "meanSelError" : 1.484 }
+{ "category" : "string", "queryCount" : 44, "RMSAbsError" : 2.151, "RMSRelError" : 1.404, "meanSelError" : 4.915 }
histogramIdx:
-{ "category" : "array", "queryCount" : 84, "RMSAbsError" : 2.53, "RMSRelError" : 0.456, "meanSelError" : 8.004 }
-{ "category" : "integer", "queryCount" : 24, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "mixed", "queryCount" : 31, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
-{ "category" : "string", "queryCount" : 36, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "array", "queryCount" : 91, "RMSAbsError" : 2.672, "RMSRelError" : 0.422, "meanSelError" : 7.725 }
+{ "category" : "integer", "queryCount" : 32, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "mixed", "queryCount" : 40, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
+{ "category" : "string", "queryCount" : 44, "RMSAbsError" : 0, "RMSRelError" : 0, "meanSelError" : 0 }
[jsTest] ----
-[jsTest] Mean errors per strategy:
+[jsTest] Mean errors per strategy for predicate { "elemMatch" : true }:
[jsTest] ----
-heuristic: { "RMSAbsError" : 4.492, "RMSRelError" : 1.964, "meanSelError" : 17.939 }
-heuristicIdx: { "RMSAbsError" : 4.99, "RMSRelError" : 2.513, "meanSelError" : 20.667 }
-histogram: { "RMSAbsError" : 2.194, "RMSRelError" : 1.093, "meanSelError" : 5.975 }
-histogramIdx: { "RMSAbsError" : 1.753, "RMSRelError" : 0.316, "meanSelError" : 3.842 }
+heuristic: { "RMSAbsError" : 2.892, "RMSRelError" : 0.488, "meanSelError" : 10.886 }
+heuristicIdx: { "RMSAbsError" : 2.892, "RMSRelError" : 0.488, "meanSelError" : 10.886 }
+histogram: { "RMSAbsError" : 3.923, "RMSRelError" : 0.502, "meanSelError" : 13.506 }
+histogramIdx: { "RMSAbsError" : 3.923, "RMSRelError" : 0.502, "meanSelError" : 13.506 }
+
+
+[jsTest] ----
+[jsTest] Mean errors per strategy for predicate { }:
+[jsTest] ----
+
+heuristic: { "RMSAbsError" : 4.842, "RMSRelError" : 1.575, "meanSelError" : 19.211 }
+heuristicIdx: { "RMSAbsError" : 5.357, "RMSRelError" : 2.065, "meanSelError" : 22.094 }
+histogram: { "RMSAbsError" : 2.144, "RMSRelError" : 0.861, "meanSelError" : 5.18 }
+histogramIdx: { "RMSAbsError" : 1.771, "RMSRelError" : 0.28, "meanSelError" : 3.396 }
[jsTest] ----
[jsTest] Top 10 inaccurate cardinality estimates by histogram according to the relError field:
[jsTest] ----
-Id: 41: [ { "$match" : { "b" : { "$gte" : "opqr", "$lt" : "oprr" } } } ], qtype: small range, data type: string,
+Id: 52: [ { "$match" : { "b" : { "$gte" : "opqr", "$lte" : "oprr" } } } ], qtype: small range, data type: string,
cardinality: 1, Histogram estimation: 7.42, errors: { "absError" : 6.42, "relError" : 6.42, "selError" : 32.1 }
-Id: 55: [ { "$match" : { "b" : { "$gt" : "opqr", "$lt" : "rpqr" } } } ], qtype: large range, data type: string,
+Id: 70: [ { "$match" : { "b" : { "$gt" : "opqr", "$lte" : "rpqr" } } } ], qtype: large range, data type: string,
+cardinality: 1, Histogram estimation: 6.97, errors: { "absError" : 5.97, "relError" : 5.97, "selError" : 29.85 }
+Id: 26: [ { "$match" : { "a" : { "$gt" : 25, "$lt" : 27 } } } ], qtype: large range, data type: integer,
cardinality: 1, Histogram estimation: 6.97, errors: { "absError" : 5.97, "relError" : 5.97, "selError" : 29.85 }
-Id: 42: [ { "$match" : { "b" : { "$gte" : "stu", "$lte" : "stv" } } } ], qtype: small range, data type: string,
-cardinality: 1, Histogram estimation: 5.86, errors: { "absError" : 4.86, "relError" : 4.86, "selError" : 24.3 }
-Id: 20: [ { "$match" : { "a" : { "$gt" : 27, "$lt" : 29 } } } ], qtype: large range, data type: integer,
-cardinality: 1, Histogram estimation: 5.86, errors: { "absError" : 4.86, "relError" : 4.86, "selError" : 24.3 }
-Id: 49: [ { "$match" : { "b" : { "$gte" : "stu", "$lt" : "svu" } } } ], qtype: medium range, data type: string,
-cardinality: 1, Histogram estimation: 5.86, errors: { "absError" : 4.86, "relError" : 4.86, "selError" : 24.3 }
-Id: 47: [ { "$match" : { "b" : { "$gt" : "c", "$lt" : "e" } } } ], qtype: medium range, data type: string,
-cardinality: 1, Histogram estimation: 3.69, errors: { "absError" : 2.69, "relError" : 2.69, "selError" : 13.45 }
-Id: 40: [ { "$match" : { "b" : { "$gt" : "c", "$lte" : "d" } } } ], qtype: small range, data type: string,
-cardinality: 1, Histogram estimation: 3.69, errors: { "absError" : 2.69, "relError" : 2.69, "selError" : 13.45 }
-Id: 18: [ { "$match" : { "a" : { "$gte" : 17, "$lt" : 19 } } } ], qtype: large range, data type: integer,
-cardinality: 2, Histogram estimation: 7.26, errors: { "absError" : 5.26, "relError" : 2.63, "selError" : 26.3 }
-Id: 50: [ { "$match" : { "b" : { "$gte" : "wxyz", "$lte" : "wzyz" } } } ], qtype: medium range, data type: string,
+Id: 27: [ { "$match" : { "a" : { "$gt" : 27, "$lte" : 29 } } } ], qtype: large range, data type: integer,
+cardinality: 2, Histogram estimation: 6.06, errors: { "absError" : 4.06, "relError" : 2.03, "selError" : 20.3 }
+Id: 63: [ { "$match" : { "b" : { "$gte" : "wxyz", "$lt" : "wzyz" } } } ], qtype: medium range, data type: string,
cardinality: 1, Histogram estimation: 2.85, errors: { "absError" : 1.85, "relError" : 1.85, "selError" : 9.25 }
-Id: 162: [ { "$match" : { "mixed" : { "$gte" : "mno", "$lt" : "mnp" } } } ], qtype: small range, data type: mixed,
+Id: 191: [ { "$match" : { "mixed" : { "$gte" : "mno", "$lt" : "mnp" } } } ], qtype: small range, data type: mixed,
cardinality: 1, Histogram estimation: 2.74, errors: { "absError" : 1.74, "relError" : 1.74, "selError" : 8.7 }
+Id: 25: [ { "$match" : { "a" : { "$gte" : 17, "$lte" : 19 } } } ], qtype: large range, data type: integer,
+cardinality: 3, Histogram estimation: 8.06, errors: { "absError" : 5.06, "relError" : 1.69, "selError" : 25.3 }
+Id: 113: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ], qtype: small range, data type: array,
+cardinality: 3, Histogram estimation: 7.53, errors: { "absError" : 4.53, "relError" : 1.51, "selError" : 22.65 }
+Id: 202: [ { "$match" : { "mixed" : { "$gt" : "gh", "$lte" : "jh" } } } ], qtype: large range, data type: mixed,
+cardinality: 1, Histogram estimation: 2.37, errors: { "absError" : 1.37, "relError" : 1.37, "selError" : 6.85 }
+Id: 69: [ { "$match" : { "b" : { "$gt" : "c", "$lt" : "f" } } } ], qtype: large range, data type: string,
+cardinality: 2, Histogram estimation: 4.61, errors: { "absError" : 2.61, "relError" : 1.31, "selError" : 13.05 }
[jsTest] ----
[jsTest] Top 10 inaccurate cardinality estimates by histogramIdx according to the relError field:
[jsTest] ----
-Id: 96: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ], qtype: small range, data type: array,
+Id: 113: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ], qtype: small range, data type: array,
cardinality: 3, Histogram estimation: 7.53, errors: { "absError" : 4.53, "relError" : 1.51, "selError" : 22.65 }
-Id: 139: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lte" : 18 } } } } ], qtype: large range, data type: array,
-cardinality: 7, Histogram estimation: 14.7, errors: { "absError" : 7.7, "relError" : 1.1, "selError" : 38.5 }
-Id: 94: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 15 } } } ], qtype: small range, data type: array,
-cardinality: 4, Histogram estimation: 8.37, errors: { "absError" : 4.37, "relError" : 1.09, "selError" : 21.85 }
-Id: 116: [ { "$match" : { "c" : { "$gt" : 9, "$lt" : 16 } } } ], qtype: medium range, data type: array,
+Id: 111: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 15 } } } ], qtype: small range, data type: array,
cardinality: 4, Histogram estimation: 8.37, errors: { "absError" : 4.37, "relError" : 1.09, "selError" : 21.85 }
-Id: 131: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ], qtype: large range, data type: array,
+Id: 152: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 2, "$lte" : 9 } } } } ], qtype: large range, data type: array,
cardinality: 9, Histogram estimation: 17.97, errors: { "absError" : 8.97, "relError" : 1, "selError" : 44.85 }
-Id: 84: [ { "$match" : { "c" : { "$gt" : 1, "$lt" : 2 } } } ], qtype: small range, data type: array,
-cardinality: 1, Histogram estimation: 1.95, errors: { "absError" : 0.95, "relError" : 0.95, "selError" : 4.75 }
-Id: 86: [ { "$match" : { "c" : { "$gt" : 2, "$lte" : 3 } } } ], qtype: small range, data type: array,
-cardinality: 2, Histogram estimation: 3.79, errors: { "absError" : 1.79, "relError" : 0.9, "selError" : 8.95 }
-Id: 108: [ { "$match" : { "c" : { "$gt" : 2, "$lt" : 4 } } } ], qtype: medium range, data type: array,
-cardinality: 2, Histogram estimation: 3.79, errors: { "absError" : 1.79, "relError" : 0.9, "selError" : 8.95 }
-Id: 88: [ { "$match" : { "c" : { "$gte" : 3, "$lt" : 4 } } } ], qtype: small range, data type: array,
-cardinality: 2, Histogram estimation: 3.79, errors: { "absError" : 1.79, "relError" : 0.9, "selError" : 8.95 }
-Id: 100: [ { "$match" : { "c" : { "$gt" : 17, "$lt" : 18 } } } ], qtype: small range, data type: array,
+Id: 132: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ], qtype: medium range, data type: array,
+cardinality: 9, Histogram estimation: 17.97, errors: { "absError" : 8.97, "relError" : 1, "selError" : 44.85 }
+Id: 154: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lt" : 15 } } } } ], qtype: large range, data type: array,
+cardinality: 10, Histogram estimation: 19.6, errors: { "absError" : 9.6, "relError" : 0.96, "selError" : 48 }
+Id: 137: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 17 } } } ], qtype: medium range, data type: array,
+cardinality: 4, Histogram estimation: 7.79, errors: { "absError" : 3.79, "relError" : 0.95, "selError" : 18.95 }
+Id: 108: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 5 } } } } ], qtype: small range, data type: array,
+cardinality: 4, Histogram estimation: 7.35, errors: { "absError" : 3.35, "relError" : 0.84, "selError" : 16.75 }
+Id: 164: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 17, "$lte" : 20 } } } } ], qtype: large range, data type: array,
+cardinality: 9, Histogram estimation: 16.34, errors: { "absError" : 7.34, "relError" : 0.82, "selError" : 36.7 }
+Id: 117: [ { "$match" : { "c" : { "$gt" : 17, "$lt" : 18 } } } ], qtype: small range, data type: array,
cardinality: 4, Histogram estimation: 7.16, errors: { "absError" : 3.16, "relError" : 0.79, "selError" : 15.8 }
+Id: 160: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 15, "$lte" : 18 } } } } ], qtype: large range, data type: array,
+cardinality: 7, Histogram estimation: 12.25, errors: { "absError" : 5.25, "relError" : 0.75, "selError" : 26.25 }
[jsTest] ----
[jsTest] Top 10 inaccurate cardinality estimates by histogram according to the absError field:
[jsTest] ----
-Id: 131: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ], qtype: large range, data type: array,
+Id: 154: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lt" : 15 } } } } ], qtype: large range, data type: array,
+cardinality: 10, Histogram estimation: 19.6, errors: { "absError" : 9.6, "relError" : 0.96, "selError" : 48 }
+Id: 132: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ], qtype: medium range, data type: array,
+cardinality: 9, Histogram estimation: 17.97, errors: { "absError" : 8.97, "relError" : 1, "selError" : 44.85 }
+Id: 152: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 2, "$lte" : 9 } } } } ], qtype: large range, data type: array,
cardinality: 9, Histogram estimation: 17.97, errors: { "absError" : 8.97, "relError" : 1, "selError" : 44.85 }
-Id: 139: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lte" : 18 } } } } ], qtype: large range, data type: array,
-cardinality: 7, Histogram estimation: 14.7, errors: { "absError" : 7.7, "relError" : 1.1, "selError" : 38.5 }
-Id: 135: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 5, "$lte" : 16 } } } } ], qtype: large range, data type: array,
-cardinality: 11, Histogram estimation: 17.97, errors: { "absError" : 6.97, "relError" : 0.63, "selError" : 34.85 }
-Id: 48: [ { "$match" : { "b" : { "$gt" : "opqr", "$lte" : "orqr" } } } ], qtype: medium range, data type: string,
+Id: 164: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 17, "$lte" : 20 } } } } ], qtype: large range, data type: array,
+cardinality: 9, Histogram estimation: 16.34, errors: { "absError" : 7.34, "relError" : 0.82, "selError" : 36.7 }
+Id: 156: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 5, "$lte" : 16 } } } } ], qtype: large range, data type: array,
+cardinality: 13, Histogram estimation: 20, errors: { "absError" : 7, "relError" : 0.54, "selError" : 35 }
+Id: 61: [ { "$match" : { "b" : { "$gt" : "opqr", "$lt" : "orqr" } } } ], qtype: medium range, data type: string,
cardinality: 0, Histogram estimation: 6.67, errors: { "absError" : 6.67, "relError" : 0.67, "selError" : 33.35 }
-Id: 41: [ { "$match" : { "b" : { "$gte" : "opqr", "$lt" : "oprr" } } } ], qtype: small range, data type: string,
+Id: 52: [ { "$match" : { "b" : { "$gte" : "opqr", "$lte" : "oprr" } } } ], qtype: small range, data type: string,
cardinality: 1, Histogram estimation: 7.42, errors: { "absError" : 6.42, "relError" : 6.42, "selError" : 32.1 }
-Id: 115: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 5, "$lte" : 15 } } } } ], qtype: medium range, data type: array,
-cardinality: 12, Histogram estimation: 17.97, errors: { "absError" : 5.97, "relError" : 0.5, "selError" : 29.85 }
-Id: 55: [ { "$match" : { "b" : { "$gt" : "opqr", "$lt" : "rpqr" } } } ], qtype: large range, data type: string,
+Id: 26: [ { "$match" : { "a" : { "$gt" : 25, "$lt" : 27 } } } ], qtype: large range, data type: integer,
cardinality: 1, Histogram estimation: 6.97, errors: { "absError" : 5.97, "relError" : 5.97, "selError" : 29.85 }
-Id: 113: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 4, "$lt" : 9 } } } } ], qtype: medium range, data type: array,
-cardinality: 8, Histogram estimation: 13.89, errors: { "absError" : 5.89, "relError" : 0.74, "selError" : 29.45 }
-Id: 133: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 4, "$lt" : 15 } } } } ], qtype: large range, data type: array,
-cardinality: 10, Histogram estimation: 15.52, errors: { "absError" : 5.52, "relError" : 0.55, "selError" : 27.6 }
-Id: 18: [ { "$match" : { "a" : { "$gte" : 17, "$lt" : 19 } } } ], qtype: large range, data type: integer,
-cardinality: 2, Histogram estimation: 7.26, errors: { "absError" : 5.26, "relError" : 2.63, "selError" : 26.3 }
+Id: 70: [ { "$match" : { "b" : { "$gt" : "opqr", "$lte" : "rpqr" } } } ], qtype: large range, data type: string,
+cardinality: 1, Histogram estimation: 6.97, errors: { "absError" : 5.97, "relError" : 5.97, "selError" : 29.85 }
+Id: 160: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 15, "$lte" : 18 } } } } ], qtype: large range, data type: array,
+cardinality: 7, Histogram estimation: 12.25, errors: { "absError" : 5.25, "relError" : 0.75, "selError" : 26.25 }
[jsTest] ----
[jsTest] Top 10 inaccurate cardinality estimates by histogramIdx according to the absError field:
[jsTest] ----
-Id: 131: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ], qtype: large range, data type: array,
+Id: 154: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lt" : 15 } } } } ], qtype: large range, data type: array,
+cardinality: 10, Histogram estimation: 19.6, errors: { "absError" : 9.6, "relError" : 0.96, "selError" : 48 }
+Id: 132: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 3, "$lte" : 9 } } } } ], qtype: medium range, data type: array,
+cardinality: 9, Histogram estimation: 17.97, errors: { "absError" : 8.97, "relError" : 1, "selError" : 44.85 }
+Id: 152: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 2, "$lte" : 9 } } } } ], qtype: large range, data type: array,
cardinality: 9, Histogram estimation: 17.97, errors: { "absError" : 8.97, "relError" : 1, "selError" : 44.85 }
-Id: 139: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 15, "$lte" : 18 } } } } ], qtype: large range, data type: array,
-cardinality: 7, Histogram estimation: 14.7, errors: { "absError" : 7.7, "relError" : 1.1, "selError" : 38.5 }
-Id: 135: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 5, "$lte" : 16 } } } } ], qtype: large range, data type: array,
-cardinality: 11, Histogram estimation: 17.97, errors: { "absError" : 6.97, "relError" : 0.63, "selError" : 34.85 }
-Id: 115: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 5, "$lte" : 15 } } } } ], qtype: medium range, data type: array,
-cardinality: 12, Histogram estimation: 17.97, errors: { "absError" : 5.97, "relError" : 0.5, "selError" : 29.85 }
-Id: 113: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 4, "$lt" : 9 } } } } ], qtype: medium range, data type: array,
-cardinality: 8, Histogram estimation: 13.89, errors: { "absError" : 5.89, "relError" : 0.74, "selError" : 29.45 }
-Id: 133: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 4, "$lt" : 15 } } } } ], qtype: large range, data type: array,
-cardinality: 10, Histogram estimation: 15.52, errors: { "absError" : 5.52, "relError" : 0.55, "selError" : 27.6 }
-Id: 123: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 17, "$lte" : 19 } } } } ], qtype: medium range, data type: array,
-cardinality: 8, Histogram estimation: 13.07, errors: { "absError" : 5.07, "relError" : 0.63, "selError" : 25.35 }
-Id: 96: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ], qtype: small range, data type: array,
+Id: 164: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 17, "$lte" : 20 } } } } ], qtype: large range, data type: array,
+cardinality: 9, Histogram estimation: 16.34, errors: { "absError" : 7.34, "relError" : 0.82, "selError" : 36.7 }
+Id: 156: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 5, "$lte" : 16 } } } } ], qtype: large range, data type: array,
+cardinality: 13, Histogram estimation: 20, errors: { "absError" : 7, "relError" : 0.54, "selError" : 35 }
+Id: 160: [ { "$match" : { "c" : { "$elemMatch" : { "$gt" : 15, "$lte" : 18 } } } } ], qtype: large range, data type: array,
+cardinality: 7, Histogram estimation: 12.25, errors: { "absError" : 5.25, "relError" : 0.75, "selError" : 26.25 }
+Id: 162: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lt" : 19 } } } } ], qtype: large range, data type: array,
+cardinality: 7, Histogram estimation: 12.25, errors: { "absError" : 5.25, "relError" : 0.75, "selError" : 26.25 }
+Id: 140: [ { "$match" : { "c" : { "$elemMatch" : { "$gte" : 16, "$lte" : 18 } } } } ], qtype: medium range, data type: array,
+cardinality: 7, Histogram estimation: 12.25, errors: { "absError" : 5.25, "relError" : 0.75, "selError" : 26.25 }
+Id: 113: [ { "$match" : { "c" : { "$gte" : 15, "$lt" : 16 } } } ], qtype: small range, data type: array,
cardinality: 3, Histogram estimation: 7.53, errors: { "absError" : 4.53, "relError" : 1.51, "selError" : 22.65 }
-Id: 94: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 15 } } } ], qtype: small range, data type: array,
-cardinality: 4, Histogram estimation: 8.37, errors: { "absError" : 4.37, "relError" : 1.09, "selError" : 21.85 }
-Id: 116: [ { "$match" : { "c" : { "$gt" : 9, "$lt" : 16 } } } ], qtype: medium range, data type: array,
+Id: 111: [ { "$match" : { "c" : { "$gt" : 9, "$lte" : 15 } } } ], qtype: small range, data type: array,
cardinality: 4, Histogram estimation: 8.37, errors: { "absError" : 4.37, "relError" : 1.09, "selError" : 21.85 }
diff --git a/jstests/query_golden/libs/compute_errors.js b/jstests/query_golden/libs/compute_errors.js
index dfa8aab674c..45a96e4b99b 100644
--- a/jstests/query_golden/libs/compute_errors.js
+++ b/jstests/query_golden/libs/compute_errors.js
@@ -32,7 +32,8 @@ function computeAndPrintErrors(testcase, ceStrategies, collSize) {
_id: testcase._id,
qtype: testcase.qtype,
dtype: testcase.dtype,
- fieldName: testcase.fieldName
+ fieldName: testcase.fieldName,
+ elemMatch: testcase.elemMatch
};
ceStrategies.forEach(function(strategy) {
@@ -111,10 +112,11 @@ function aggregateErrorsPerCategory(errorColl, groupField, ceStrategies) {
}
/**
- * Aggregate errors in the 'errorColl' per CE strategy.
+ * Aggregate errors in the 'errorColl' per CE strategy. If a predicate is provided
+ * aggregate only the error documents which satisfy the predicate.
*/
-function aggregateAllErrorsPerStrategy(errorColl, ceStrategies) {
- jsTestLog(`Mean errors per strategy:`);
+function aggregateErrorsPerStrategy(errorColl, ceStrategies, predicate = {}) {
+ jsTestLog(`Mean errors per strategy for predicate ${tojsononeline(predicate)}:`);
for (const strategy of ceStrategies) {
const absError = "$" + strategy + ".absError";
const relError = "$" + strategy + ".relError";
@@ -122,6 +124,7 @@ function aggregateAllErrorsPerStrategy(errorColl, ceStrategies) {
const res =
errorColl
.aggregate([
+ {$match: predicate},
{
$project: {
absError2: {$pow: [absError, 2]},
diff --git a/jstests/query_golden/libs/generate_queries.js b/jstests/query_golden/libs/generate_queries.js
index 804b8634a8a..f1b70df5fba 100644
--- a/jstests/query_golden/libs/generate_queries.js
+++ b/jstests/query_golden/libs/generate_queries.js
@@ -30,14 +30,24 @@ function generateComparisons(field, boundaries, fieldType) {
if (i % 4 == 1) {
for (const op of compOps) {
const pred = makeMatchPredicate(field, boundary, op);
- const doc =
- {"pipeline": [pred], "qtype": op, "dtype": fieldType, "fieldName": field};
+ const doc = {
+ "pipeline": [pred],
+ "qtype": op,
+ "dtype": fieldType,
+ "fieldName": field,
+ "elemMatch": false
+ };
docs.push(doc);
}
} else {
const pred = makeMatchPredicate(field, boundary, compOps[j]);
- const doc =
- {"pipeline": [pred], "qtype": compOps[j], "dtype": fieldType, "fieldName": field};
+ const doc = {
+ "pipeline": [pred],
+ "qtype": compOps[j],
+ "dtype": fieldType,
+ "fieldName": field,
+ "elemMatch": false
+ };
docs.push(doc);
j = (j + 1) % 5;
}
@@ -46,9 +56,10 @@ function generateComparisons(field, boundaries, fieldType) {
return docs;
}
+const min_char_code = '0'.codePointAt(0);
+const max_char_code = '~'.codePointAt(0);
+
function nextChar(thisChar, distance) {
- const min_char_code = '0'.codePointAt(0);
- const max_char_code = '~'.codePointAt(0);
const number_of_chars = max_char_code - min_char_code + 1;
const char_code = thisChar.codePointAt(0);
assert(min_char_code <= char_code <= max_char_code, "char is out of range");
@@ -64,6 +75,10 @@ function nextChar(thisChar, distance) {
*/
function nextStr(str, distance) {
const spec = {"small": 3, "medium": 2, "large": 1};
+ if (str.length == 0) {
+ const nextCharCode = min_char_code + 4 - spec[distance];
+ return String.fromCodePoint(nextCharCode);
+ }
let pos = spec[distance] - 1;
if (pos >= str.length) {
pos = str.length - 1;
@@ -185,7 +200,8 @@ function generateRangePredicates(field, queryValues, fieldType) {
"pipeline": [pred],
"qtype": qSize + " range",
"dtype": fieldType,
- "fieldName": field
+ "fieldName": field,
+ "elemMatch": false
};
docs.push(doc);
if (fieldType == 'array' && range[0] <= range[1]) {
@@ -267,8 +283,10 @@ function selectHistogramBounds(statsColl, field, fieldType) {
return values;
}
-// Extract min/max values from a field. The initial unwind phase extracts the values in case the
-// field contains arrays.
+/**
+ * Extract min/max values from a field. The initial unwind phase extracts the values in case the
+ * field contains arrays.
+ */
function getMinMax(coll, field) {
const res = coll.aggregate([
{$unwind: field},
@@ -279,6 +297,48 @@ function getMinMax(coll, field) {
return res[0];
}
+/**
+ * Extract query values from an array of sample arrays. Select up to three values per array element.
+ * {[1, 3, 5], [ 2, 4, 6, 8, 10], [100]] -> [1, 3, 5, 2, 6, 10, 100]
+ */
+function selectArrayValues(nestedArray) {
+ let values = [];
+ nestedArray.forEach(function(array) {
+ if (typeof array != "object") {
+ values.push(array);
+ } else {
+ const len = array.length;
+ if (len <= 3) {
+ values = values.concat(array);
+ } else {
+ for (let ratio of [0.1, 0.5, 0.9]) {
+ const i = Math.trunc(ratio * len);
+ values.push(array[i]);
+ }
+ }
+ }
+ });
+ return values;
+}
+
+function selectOutOfRangeValues(minMaxDoc) {
+ let values = [];
+ const min = minMaxDoc["min"];
+ if (typeof min == 'number') {
+ values.push(min - 1);
+ } else if (typeof min == 'string') {
+ const prevMin = (min.length > 1) ? min.at(0) : "";
+ values.push(prevMin);
+ }
+ const max = minMaxDoc["max"];
+ if (typeof max == 'number') {
+ values.push(max + 1);
+ } else if (typeof max == 'string') {
+ values.push(nextStr(max, "small"));
+ }
+ return values;
+}
+
function sortValues(values) {
let sortColl = db["sortColl"];
sortColl.drop();
@@ -325,18 +385,21 @@ function selectQueryValues(coll, fields, fieldTypes, samplePos, statsColl) {
while (i < fields.length) {
const field = fields[i];
const fieldType = fieldTypes[i];
- const minMaxDoc = getMinMax(coll, "$" + field);
- // TODO: using min/ max values and the field type, add out-of-range values.
let v = selectFieldValues(sample, field);
if (fieldType === 'array') {
- v = v.flat();
+ v = selectArrayValues(v);
}
+ const minMaxDoc = getMinMax(coll, "$" + field);
v.push(minMaxDoc["min"]);
v.push(minMaxDoc["max"]);
- let histValues = selectHistogramBounds(statsColl, field, fieldType);
+ // Using min/ max values extract out-of-range values.
+ const outOfRange = selectOutOfRangeValues(minMaxDoc);
+ v = v.concat(outOfRange);
+
+ const histValues = selectHistogramBounds(statsColl, field, fieldType);
v = v.concat(histValues);
let values = sortValues(v);
diff --git a/jstests/query_golden/libs/run_queries_ce.js b/jstests/query_golden/libs/run_queries_ce.js
index e2905d24c79..ca033b6f0ff 100644
--- a/jstests/query_golden/libs/run_queries_ce.js
+++ b/jstests/query_golden/libs/run_queries_ce.js
@@ -96,6 +96,7 @@ function runCETestForCollection(testDB, collMeta, sampleSize = 6) {
// Queries are defined as documents. Example:
// {_id: 1, pipeline: [{$match: {a: {$gt: 16}}}], "dtype": "int", "qtype" : "$gt"}.
let testCases = generateQueries(coll, fields, fieldTypes, collSize, sampleSize, statsColl);
+ print(`Running ${testCases.length} queries over ${fields.length} fields.\n`);
runQueries(coll, testCases, ceStrategies, fields);
@@ -122,8 +123,10 @@ function runCETestForCollection(testDB, collMeta, sampleSize = 6) {
aggregateErrorsPerDataDistribution(errorColl, allStrategies);
aggregateErrorsPerCategory(errorColl, "dtype", allStrategies);
+ // Aggregate $elemMatch query errors per strategy.
+ aggregateErrorsPerStrategy(errorColl, allStrategies, {"elemMatch": true});
// Aggregate errors per strategy.
- aggregateAllErrorsPerStrategy(errorColl, allStrategies);
+ aggregateErrorsPerStrategy(errorColl, allStrategies);
printQueriesWithBadAccuracy(errorColl, testCases, "histogram", "relError");
printQueriesWithBadAccuracy(errorColl, testCases, indexedStrategy("histogram"), "relError");
diff --git a/src/mongo/db/query/ce/histogram_estimator_test.cpp b/src/mongo/db/query/ce/histogram_estimator_test.cpp
index 4276803f8e6..dccb8cefbcf 100644
--- a/src/mongo/db/query/ce/histogram_estimator_test.cpp
+++ b/src/mongo/db/query/ce/histogram_estimator_test.cpp
@@ -571,20 +571,20 @@ TEST_F(CEHistogramTest, TestArrayHistogramOnAtomicPredicates) {
ASSERT_EQ_ELEMMATCH_CE(t, 0.0 /* CE */, 0.0 /* $elemMatch CE */, "a", "{$gt: 10}");
ASSERT_EQ_ELEMMATCH_CE(t, 1.0 /* CE */, 1.0 /* $elemMatch CE */, "a", "{$gte: 10}");
- ASSERT_EQ_ELEMMATCH_CE(t, 5.0 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$lte: 10}");
- ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$lt: 10}");
- ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$gt: 1}");
- ASSERT_EQ_ELEMMATCH_CE(t, 5.0 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$gte: 1}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 5.0 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$lte: 10}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$lt: 10}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$gt: 1}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 5.0 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$gte: 1}");
- ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$lte: 5}");
- ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$lt: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$lte: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 4.0 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$lt: 5}");
ASSERT_EQ_ELEMMATCH_CE(t, 2.0 /* CE */, 2.0 /* $elemMatch CE */, "a", "{$gt: 5}");
- ASSERT_EQ_ELEMMATCH_CE(t, 2.0 /* CE */, 2.55085 /* $elemMatch CE */, "a", "{$gte: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 2.0 /* CE */, 2.40822 /* $elemMatch CE */, "a", "{$gte: 5}");
- ASSERT_EQ_ELEMMATCH_CE(t, 2.45 /* CE */, 2.55085 /* $elemMatch CE */, "a", "{$gt: 2, $lt: 5}");
- ASSERT_EQ_ELEMMATCH_CE(t, 3.27 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$gte: 2, $lt: 5}");
- ASSERT_EQ_ELEMMATCH_CE(t, 2.45 /* CE */, 3.40113 /* $elemMatch CE */, "a", "{$gt: 2, $lte: 5}");
- ASSERT_EQ_ELEMMATCH_CE(t, 3.27 /* CE */, 4.0 /* $elemMatch CE */, "a", "{$gte: 2, $lte: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 2.45 /* CE */, 2.40822 /* $elemMatch CE */, "a", "{$gt: 2, $lt: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 3.27 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$gte: 2, $lt: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 2.45 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$gt: 2, $lte: 5}");
+ ASSERT_EQ_ELEMMATCH_CE(t, 3.27 /* CE */, 3.0 /* $elemMatch CE */, "a", "{$gte: 2, $lte: 5}");
}
TEST_F(CEHistogramTest, TestArrayHistogramOnCompositePredicates) {
@@ -715,8 +715,8 @@ TEST_F(CEHistogramTest, TestArrayHistogramOnCompositePredicates) {
ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$eq: 5}}, array: {$eq: 5}}", 35.0);
// Test case with multiple predicates and ranges.
- ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$lt: 5}}", 70.2156);
- ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$gt: 5}}", 28.4848);
+ ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$lt: 5}}", 67.1508);
+ ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$gt: 5}}", 27.8562);
// Test multiple $elemMatches.
ASSERT_MATCH_CE(t, "{scalar: {$elemMatch: {$eq: 5}}, array: {$elemMatch: {$eq: 5}}}", 0.0);
@@ -734,8 +734,8 @@ TEST_F(CEHistogramTest, TestArrayHistogramOnCompositePredicates) {
"{scalar: {$elemMatch: {$eq: 5}}, mixed: {$elemMatch: {$eq: 5}}, array: "
"{$elemMatch: {$eq: 5}}}",
0.0);
- ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$elemMatch: {$lt: 5}}}", 34.1434);
- ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$elemMatch: {$gt: 5}}}", 45.5246);
+ ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$elemMatch: {$lt: 5}}}", 31.7118);
+ ASSERT_MATCH_CE(t, "{array: {$elemMatch: {$lt: 5}}, mixed: {$elemMatch: {$gt: 5}}}", 42.2825);
// Verify that we still return an estimate of 0.0 for any $elemMatch predicate on a scalar
// field when we have a non-multikey index.
diff --git a/src/mongo/db/query/ce/histogram_predicate_estimation.cpp b/src/mongo/db/query/ce/histogram_predicate_estimation.cpp
index 4075323c684..3671cd4ea6a 100644
--- a/src/mongo/db/query/ce/histogram_predicate_estimation.cpp
+++ b/src/mongo/db/query/ce/histogram_predicate_estimation.cpp
@@ -322,9 +322,7 @@ CEType estimateCardRange(const ArrayHistogram& ah,
const auto arrayMaxEst = estRange(ah.getArrayMax());
const auto arrayUniqueEst = estRange(ah.getArrayUnique());
- // ToDo: try using ah.getArrayCount() - ah.getEmptyArrayCount();
- // when the number of empty arrays is provided by the statistics.
- const double totalArrayCount = ah.getArrayCount();
+ const double totalArrayCount = ah.getArrayCount() - ah.getEmptyArrayCount();
uassert(
6715101, "Array histograms should contain at least one array", totalArrayCount > 0);