{ "explainVersion" : "2", "queryPlanner" : { "namespace" : "test.system.buckets.Collection0", "indexFilterSet" : false, "parsedQuery" : { "$and" : [ { "$or" : [ { "$and" : [ { "control.max.obj.measurement1" : { "$_internalExprGte" : 4 } }, { "control.min.obj.measurement1" : { "$_internalExprLte" : 4 } } ] }, { "$and" : [ { "control.max.obj.measurement1" : { "$_internalExprGte" : 9 } }, { "control.min.obj.measurement1" : { "$_internalExprLte" : 9 } } ] } ] }, { "control.max.obj.measurement3" : { "$_internalExprGt" : 100 } }, { "control.min.obj.measurement3" : { "$_internalExprLt" : 800 } }, { "control.min.obj.measurement2" : { "$_internalExprLte" : 175 } } ] }, "queryHash" : "AC84E43E", "planCacheKey" : "1580492E", "optimizedPipeline" : true, "maxIndexedOrSolutionsReached" : false, "maxIndexedAndSolutionsReached" : false, "maxScansToExplodeReached" : false, "winningPlan" : { "queryPlan" : { "stage" : "PROJECTION_DEFAULT", "planNodeId" : 4, "transformBy" : { "count" : true, "_id" : false }, "inputStage" : { "stage" : "GROUP", "planNodeId" : 3, "inputStage" : { "stage" : "UNPACK_TS_BUCKET", "planNodeId" : 2, "include" : [ "obj" ], "computedMetaProjFields" : [ ], "includeMeta" : false, "eventFilter" : { "$and" : [ { "obj.measurement1" : { "$in" : [ 4, 9 ] } }, { "obj.measurement2" : { "$lte" : 175 } }, { "obj.measurement3" : { "$gt" : 100 } }, { "obj.measurement3" : { "$lt" : 800 } } ] }, "wholeBucketFilter" : { }, "inputStage" : { "stage" : "COLLSCAN", "planNodeId" : 1, "filter" : { "$and" : [ { "$or" : [ { "$and" : [ { "control.max.obj.measurement1" : { "$_internalExprGte" : 4 } }, { "control.min.obj.measurement1" : { "$_internalExprLte" : 4 } } ] }, { "$and" : [ { "control.max.obj.measurement1" : { "$_internalExprGte" : 9 } }, { "control.min.obj.measurement1" : { "$_internalExprLte" : 9 } } ] } ] }, { "control.max.obj.measurement3" : { "$_internalExprGt" : 100 } }, { "control.min.obj.measurement3" : { "$_internalExprLt" : 800 } }, { "control.min.obj.measurement2" : { "$_internalExprLte" : 175 } } ] }, "direction" : "forward" } } } }, "slotBasedPlan" : { "slots" : "$$RESULT=s15 env: { s1 = Nothing (nothing), s9 = 4.0 9.0 , s11 = 4.0 9.0 }", "stages" : "[4] project [s15 = makeBsonObj(MakeObjSpec([count], [_id, count], Closed, RetNothing), null, true, Nothing, s12)] [3] project [s14 = null] [3] group [] [s12 = sum(1)] spillSlots[s13] mergingExprs[sum(s13)] [2] filter {(traverseF(s10, lambda(l101.0) { traverseF(getField(move(l101.0), \"measurement1\"), lambda(l102.0) { isMember(move(l102.0), s11) }, false) }, false) && (traverseF(s10, lambda(l101.0) { traverseF(getField(move(l101.0), \"measurement2\"), lambda(l102.0) { ((move(l102.0) <= 175L) ?: false) }, false) }, false) && (traverseF(s10, lambda(l101.0) { traverseF(getField(move(l101.0), \"measurement3\"), lambda(l102.0) { ((move(l102.0) > 100L) ?: false) }, false) }, false) && traverseF(s10, lambda(l103.0) { traverseF(getField(move(l103.0), \"measurement3\"), lambda(l104.0) { ((move(l104.0) < 800L) ?: false) }, false) }, false))))} [2] block_to_row blocks[s5] row[s10] [2] ts_bucket_to_cellblock s3 pathReqs[s5 = Get(obj)/Id, s6 = Get(obj)/Traverse/Get(measurement1)/Traverse/Id, s7 = Get(obj)/Traverse/Get(measurement2)/Traverse/Id, s8 = Get(obj)/Traverse/Get(measurement3)/Traverse/Id] [1] filter {(((( if (isArray(traverseP(s2, lambda(l101.0) { traverseP(getField(move(l101.0), \"max\"), lambda(l102.0) { traverseP(getField(move(l102.0), \"obj\"), lambda(l103.0) { getField(move(l103.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l104.0 = traverseP(s2, lambda(l105.0) { traverseP(getField(move(l105.0), \"max\"), lambda(l106.0) { traverseP(getField(move(l106.0), \"obj\"), lambda(l107.0) { getField(move(l107.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l104.0 <=> 4L) >= 0) ?: ((exists(l104.0) && typeMatch(l104.0, -65)) >= true)) && if (isArray(traverseP(s2, lambda(l108.0) { traverseP(getField(move(l108.0), \"min\"), lambda(l109.0) { traverseP(getField(move(l109.0), \"obj\"), lambda(l110.0) { getField(move(l110.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l111.0 = traverseP(s2, lambda(l112.0) { traverseP(getField(move(l112.0), \"min\"), lambda(l113.0) { traverseP(getField(move(l113.0), \"obj\"), lambda(l114.0) { getField(move(l114.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l111.0 <=> 4L) <= 0) ?: ((exists(l111.0) && typeMatch(l111.0, -65)) <= true)) ) || ( if (isArray(traverseP(s2, lambda(l115.0) { traverseP(getField(move(l115.0), \"max\"), lambda(l116.0) { traverseP(getField(move(l116.0), \"obj\"), lambda(l117.0) { getField(move(l117.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l118.0 = traverseP(s2, lambda(l119.0) { traverseP(getField(move(l119.0), \"max\"), lambda(l120.0) { traverseP(getField(move(l120.0), \"obj\"), lambda(l121.0) { getField(move(l121.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l118.0 <=> 9L) >= 0) ?: ((exists(l118.0) && typeMatch(l118.0, -65)) >= true)) && if (isArray(traverseP(s2, lambda(l122.0) { traverseP(getField(move(l122.0), \"min\"), lambda(l123.0) { traverseP(getField(move(l123.0), \"obj\"), lambda(l124.0) { getField(move(l124.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l125.0 = traverseP(s2, lambda(l126.0) { traverseP(getField(move(l126.0), \"min\"), lambda(l127.0) { traverseP(getField(move(l127.0), \"obj\"), lambda(l128.0) { getField(move(l128.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l125.0 <=> 9L) <= 0) ?: ((exists(l125.0) && typeMatch(l125.0, -65)) <= true)) )) && if (isArray(traverseP(s2, lambda(l129.0) { traverseP(getField(move(l129.0), \"max\"), lambda(l130.0) { traverseP(getField(move(l130.0), \"obj\"), lambda(l131.0) { getField(move(l131.0), \"measurement3\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l132.0 = traverseP(s2, lambda(l133.0) { traverseP(getField(move(l133.0), \"max\"), lambda(l134.0) { traverseP(getField(move(l134.0), \"obj\"), lambda(l135.0) { getField(move(l135.0), \"measurement3\") }, 1) }, 1) }, 1) ] in (((l132.0 <=> 100L) > 0) ?: ((exists(l132.0) && typeMatch(l132.0, -65)) > true)) ) && ( if (isArray(traverseP(s2, lambda(l136.0) { traverseP(getField(move(l136.0), \"min\"), lambda(l137.0) { traverseP(getField(move(l137.0), \"obj\"), lambda(l138.0) { getField(move(l138.0), \"measurement3\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l139.0 = traverseP(s2, lambda(l140.0) { traverseP(getField(move(l140.0), \"min\"), lambda(l141.0) { traverseP(getField(move(l141.0), \"obj\"), lambda(l142.0) { getField(move(l142.0), \"measurement3\") }, 1) }, 1) }, 1) ] in (((l139.0 <=> 800L) < 0) ?: ((exists(l139.0) && typeMatch(l139.0, -65)) < true)) && if (isArray(traverseP(s2, lambda(l143.0) { traverseP(getField(move(l143.0), \"min\"), lambda(l144.0) { traverseP(getField(move(l144.0), \"obj\"), lambda(l145.0) { getField(move(l145.0), \"measurement2\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l146.0 = traverseP(s2, lambda(l147.0) { traverseP(getField(move(l147.0), \"min\"), lambda(l148.0) { traverseP(getField(move(l148.0), \"obj\"), lambda(l149.0) { getField(move(l149.0), \"measurement2\") }, 1) }, 1) }, 1) ] in (((l146.0 <=> 175L) <= 0) ?: ((exists(l146.0) && typeMatch(l146.0, -65)) <= true)) ))} [1] scan s3 s4 none none none none none none lowPriority [s2 = control] @\"4efdb918-72b3-4218-961c-a2e4ec93dfac\" true false " } }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 1, "executionTimeMillis" : 829, "totalKeysExamined" : 0, "totalDocsExamined" : 1080, "executionStages" : { "stage" : "project", "planNodeId" : 4, "nReturned" : 1, "executionTimeMillisEstimate" : 819, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "projections" : { "15" : "makeBsonObj(MakeObjSpec([count], [_id, count], Closed, RetNothing), null, true, Nothing, s12) " }, "inputStage" : { "stage" : "project", "planNodeId" : 3, "nReturned" : 1, "executionTimeMillisEstimate" : 819, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "projections" : { "14" : "null " }, "inputStage" : { "stage" : "group", "planNodeId" : 3, "nReturned" : 1, "executionTimeMillisEstimate" : 819, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "groupBySlots" : [ ], "expressions" : { "12" : "sum(1) ", "initExprs" : { "12" : null } }, "mergingExprs" : { "13" : "sum(s13) " }, "usedDisk" : false, "spills" : 0, "spilledRecords" : 0, "spilledDataStorageSize" : 0, "inputStage" : { "stage" : "filter", "planNodeId" : 2, "nReturned" : 127724, "executionTimeMillisEstimate" : 789, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "numTested" : 1000000, "filter" : "(traverseF(s10, lambda(l101.0) { traverseF(getField(move(l101.0), \"measurement1\"), lambda(l102.0) { isMember(move(l102.0), s11) }, false) }, false) && (traverseF(s10, lambda(l101.0) { traverseF(getField(move(l101.0), \"measurement2\"), lambda(l102.0) { ((move(l102.0) <= 175L) ?: false) }, false) }, false) && (traverseF(s10, lambda(l101.0) { traverseF(getField(move(l101.0), \"measurement3\"), lambda(l102.0) { ((move(l102.0) > 100L) ?: false) }, false) }, false) && traverseF(s10, lambda(l103.0) { traverseF(getField(move(l103.0), \"measurement3\"), lambda(l104.0) { ((move(l104.0) < 800L) ?: false) }, false) }, false)))) ", "inputStage" : { "stage" : "block_to_row", "planNodeId" : 2, "nReturned" : 1000000, "executionTimeMillisEstimate" : 564, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "inputStage" : { "stage" : "ts_bucket_to_cellblock", "planNodeId" : 2, "nReturned" : 1080, "executionTimeMillisEstimate" : 558, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "inputStage" : { "stage" : "filter", "planNodeId" : 1, "nReturned" : 1080, "executionTimeMillisEstimate" : 11, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "numTested" : 1080, "filter" : "(((( if (isArray(traverseP(s2, lambda(l101.0) { traverseP(getField(move(l101.0), \"max\"), lambda(l102.0) { traverseP(getField(move(l102.0), \"obj\"), lambda(l103.0) { getField(move(l103.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l104.0 = traverseP(s2, lambda(l105.0) { traverseP(getField(move(l105.0), \"max\"), lambda(l106.0) { traverseP(getField(move(l106.0), \"obj\"), lambda(l107.0) { getField(move(l107.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l104.0 <=> 4L) >= 0) ?: ((exists(l104.0) && typeMatch(l104.0, -65)) >= true)) && if (isArray(traverseP(s2, lambda(l108.0) { traverseP(getField(move(l108.0), \"min\"), lambda(l109.0) { traverseP(getField(move(l109.0), \"obj\"), lambda(l110.0) { getField(move(l110.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l111.0 = traverseP(s2, lambda(l112.0) { traverseP(getField(move(l112.0), \"min\"), lambda(l113.0) { traverseP(getField(move(l113.0), \"obj\"), lambda(l114.0) { getField(move(l114.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l111.0 <=> 4L) <= 0) ?: ((exists(l111.0) && typeMatch(l111.0, -65)) <= true)) ) || ( if (isArray(traverseP(s2, lambda(l115.0) { traverseP(getField(move(l115.0), \"max\"), lambda(l116.0) { traverseP(getField(move(l116.0), \"obj\"), lambda(l117.0) { getField(move(l117.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l118.0 = traverseP(s2, lambda(l119.0) { traverseP(getField(move(l119.0), \"max\"), lambda(l120.0) { traverseP(getField(move(l120.0), \"obj\"), lambda(l121.0) { getField(move(l121.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l118.0 <=> 9L) >= 0) ?: ((exists(l118.0) && typeMatch(l118.0, -65)) >= true)) && if (isArray(traverseP(s2, lambda(l122.0) { traverseP(getField(move(l122.0), \"min\"), lambda(l123.0) { traverseP(getField(move(l123.0), \"obj\"), lambda(l124.0) { getField(move(l124.0), \"measurement1\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l125.0 = traverseP(s2, lambda(l126.0) { traverseP(getField(move(l126.0), \"min\"), lambda(l127.0) { traverseP(getField(move(l127.0), \"obj\"), lambda(l128.0) { getField(move(l128.0), \"measurement1\") }, 1) }, 1) }, 1) ] in (((l125.0 <=> 9L) <= 0) ?: ((exists(l125.0) && typeMatch(l125.0, -65)) <= true)) )) && if (isArray(traverseP(s2, lambda(l129.0) { traverseP(getField(move(l129.0), \"max\"), lambda(l130.0) { traverseP(getField(move(l130.0), \"obj\"), lambda(l131.0) { getField(move(l131.0), \"measurement3\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l132.0 = traverseP(s2, lambda(l133.0) { traverseP(getField(move(l133.0), \"max\"), lambda(l134.0) { traverseP(getField(move(l134.0), \"obj\"), lambda(l135.0) { getField(move(l135.0), \"measurement3\") }, 1) }, 1) }, 1) ] in (((l132.0 <=> 100L) > 0) ?: ((exists(l132.0) && typeMatch(l132.0, -65)) > true)) ) && ( if (isArray(traverseP(s2, lambda(l136.0) { traverseP(getField(move(l136.0), \"min\"), lambda(l137.0) { traverseP(getField(move(l137.0), \"obj\"), lambda(l138.0) { getField(move(l138.0), \"measurement3\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l139.0 = traverseP(s2, lambda(l140.0) { traverseP(getField(move(l140.0), \"min\"), lambda(l141.0) { traverseP(getField(move(l141.0), \"obj\"), lambda(l142.0) { getField(move(l142.0), \"measurement3\") }, 1) }, 1) }, 1) ] in (((l139.0 <=> 800L) < 0) ?: ((exists(l139.0) && typeMatch(l139.0, -65)) < true)) && if (isArray(traverseP(s2, lambda(l143.0) { traverseP(getField(move(l143.0), \"min\"), lambda(l144.0) { traverseP(getField(move(l144.0), \"obj\"), lambda(l145.0) { getField(move(l145.0), \"measurement2\") }, 1) }, 1) }, 1)) ?: true) then true else let [ l146.0 = traverseP(s2, lambda(l147.0) { traverseP(getField(move(l147.0), \"min\"), lambda(l148.0) { traverseP(getField(move(l148.0), \"obj\"), lambda(l149.0) { getField(move(l149.0), \"measurement2\") }, 1) }, 1) }, 1) ] in (((l146.0 <=> 175L) <= 0) ?: ((exists(l146.0) && typeMatch(l146.0, -65)) <= true)) )) ", "inputStage" : { "stage" : "scan", "planNodeId" : 1, "nReturned" : 1080, "executionTimeMillisEstimate" : 11, "opens" : 1, "closes" : 1, "saveState" : 45, "restoreState" : 45, "isEOF" : 1, "numReads" : 1080, "recordSlot" : 3, "recordIdSlot" : 4, "scanFieldNames" : [ "control" ], "scanFieldSlots" : [ NumberLong(2) ] } } } } } } } } }, "command" : { "aggregate" : "system.buckets.Collection0", "pipeline" : [ { "$_internalUnpackBucket" : { "timeField" : "time", "metaField" : "meta", "bucketMaxSpanSeconds" : 3600, "assumeNoMixedSchemaData" : true, "usesExtendedRange" : false, "fixedBuckets" : false } }, { "$match" : { "$and" : [ { "$or" : [ { "obj.measurement1" : 4 }, { "obj.measurement1" : 9 } ] }, { "obj.measurement2" : { "$lte" : 175 } }, { "obj.measurement3" : { "$gt" : 100, "$lt" : 800 } } ] } }, { "$count" : "count" } ], "cursor" : { }, "collation" : { "locale" : "simple" } }, "serverInfo" : { "host" : "ip-10-122-3-146", "port" : 30000, "version" : "7.2.0-alpha0-142-g18ef5c7", "gitVersion" : "nogitversion" }, "serverParameters" : { "internalQueryFacetBufferSizeBytes" : 104857600, "internalQueryFacetMaxOutputDocSizeBytes" : 104857600, "internalLookupStageIntermediateDocumentMaxSizeBytes" : 104857600, "internalDocumentSourceGroupMaxMemoryBytes" : 104857600, "internalQueryMaxBlockingSortMemoryUsageBytes" : 104857600, "internalQueryProhibitBlockingMergeOnMongoS" : 0, "internalQueryMaxAddToSetBytes" : 104857600, "internalDocumentSourceSetWindowFieldsMaxMemoryBytes" : 104857600, "internalQueryFrameworkControl" : "trySbeEngine" }, "ok" : 1 }