{ "explainVersion" : "2", "queryPlanner" : { "namespace" : "test.xxx", "indexFilterSet" : false, "parsedQuery" : { "a" : { "$not" : { "$eq" : 2 } } }, "queryHash" : "5AC442E4", "planCacheKey" : "B8B60519", "optimizationTimeMillis" : 7, "optimizedPipeline" : true, "maxIndexedOrSolutionsReached" : false, "maxIndexedAndSolutionsReached" : false, "maxScansToExplodeReached" : false, "prunedSimilarIndexes" : false, "winningPlan" : { "isCached" : true, "queryPlan" : { "stage" : "PROJECTION_DEFAULT", "planNodeId" : 5, "transformBy" : { "a" : true, "_id" : false }, "inputStage" : { "stage" : "GROUP", "planNodeId" : 4, "inputStage" : { "stage" : "MATCH", "planNodeId" : 3, "filter" : { "b" : { "$not" : { "$exists" : true } } }, "inputStage" : { "stage" : "PROJECTION_COVERED", "planNodeId" : 2, "transformBy" : { "b" : true, "_id" : false }, "inputStage" : { "stage" : "IXSCAN", "planNodeId" : 1, "keyPattern" : { "a" : 1, "b" : 1 }, "indexName" : "a_1_b_1", "isMultiKey" : false, "multiKeyPaths" : { "a" : [ ], "b" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2, "direction" : "forward", "indexBounds" : { "a" : [ "[MinKey, 2.0)", "(2.0, MaxKey]" ], "b" : [ "[MinKey, MaxKey]" ] } } } } } }, "slotBasedPlan" : { "slots" : "$$RESULT=s18 env: { s5 = IndexBounds(\"field #0['a']: [MinKey, 2.0), (2.0, MaxKey], field #1['b']: [MinKey, MaxKey]\"), s9 = Nothing, s13 = true }", "stages" : "[5] project [s18 = makeBsonObj(MakeObjSpec([a], [a], Closed, RetNothing), null, true, s17)] \n[4] project [s16 = null, s17 = \n if isNumber(s15) \n then s15 \n else doubleDoubleSumFinalize(s15) \n] \n[4] group [] [s15 = sum(1)] spillSlots[s14] mergingExprs[convertSimpleSumToDoubleDoubleSum(s14)] \n[3] filter {!(exists(s1))} \n[1] branch {s13} [s1, s12] \n[s2, s4] [1] ixscan_generic s5 none s4 none none lowPriority [s2 = 1] @\"9d778a81-62ae-44b8-8c8e-a24abcba26d3\" @\"a_1_b_1\" true \n[s3, s6] [1] nlj inner [] [s7, s8] \n left \n [1] project [s7 = getField(s10, \"l\"), s8 = getField(s10, \"h\")] \n [1] unwind s10 s11 s9 false \n [1] limit 1ll \n [1] coscan \n right \n [1] ixseek s7 s8 none s6 none none [s3 = 1] @\"9d778a81-62ae-44b8-8c8e-a24abcba26d3\" @\"a_1_b_1\" true \n" } }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 0, "executionTimeMillis" : 12, "totalKeysExamined" : 4, "totalDocsExamined" : 0, "executionStages" : { "stage" : "project", "planNodeId" : 5, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 1, "closes" : 1, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "projections" : { "18" : "makeBsonObj(MakeObjSpec([a], [a], Closed, RetNothing), null, true, s17) " }, "inputStage" : { "stage" : "project", "planNodeId" : 4, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 1, "closes" : 1, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "projections" : { "16" : "null ", "17" : "\n if isNumber(s15) \n then s15 \n else doubleDoubleSumFinalize(s15) \n" }, "inputStage" : { "stage" : "group", "planNodeId" : 4, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 1, "closes" : 1, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "groupBySlots" : [ ], "expressions" : { "15" : "sum(1) ", "initExprs" : { "15" : null } }, "mergingExprs" : { "14" : "convertSimpleSumToDoubleDoubleSum(s14) " }, "usedDisk" : false, "spills" : 0, "spilledRecords" : 0, "spilledDataStorageSize" : 0, "inputStage" : { "stage" : "filter", "planNodeId" : 3, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 1, "closes" : 1, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "numTested" : 3, "filter" : "!(exists(s1)) ", "inputStage" : { "stage" : "branch", "planNodeId" : 1, "nReturned" : 3, "executionTimeMillisEstimate" : 0, "opens" : 1, "closes" : 1, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "numTested" : 1, "thenBranchOpens" : 1, "thenBranchCloses" : 1, "elseBranchOpens" : 0, "elseBranchCloses" : 0, "filter" : "s13 ", "thenSlots" : [ NumberLong(2), NumberLong(4) ], "elseSlots" : [ NumberLong(3), NumberLong(6) ], "outputSlots" : [ NumberLong(1), NumberLong(12) ], "thenStage" : { "stage" : "ixscan_generic", "planNodeId" : 1, "nReturned" : 3, "executionTimeMillisEstimate" : 0, "opens" : 1, "closes" : 1, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "indexName" : "a_1_b_1", "keysExamined" : 4, "seeks" : 2, "numReads" : 5, "recordIdSlot" : 4, "outputSlots" : [ NumberLong(2) ], "indexKeysToInclude" : "00000000000000000000000000000010" }, "elseStage" : { "stage" : "nlj", "planNodeId" : 1, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 0, "closes" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 0, "totalDocsExamined" : 0, "totalKeysExamined" : 0, "collectionScans" : 0, "collectionSeeks" : 0, "indexScans" : 0, "indexSeeks" : 0, "indexesUsed" : [ "a_1_b_1" ], "innerOpens" : 0, "innerCloses" : 0, "outerProjects" : [ ], "outerCorrelated" : [ NumberLong(7), NumberLong(8) ], "outerStage" : { "stage" : "project", "planNodeId" : 1, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 0, "closes" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 0, "projections" : { "7" : "getField(s10, \"l\") ", "8" : "getField(s10, \"h\") " }, "inputStage" : { "stage" : "unwind", "planNodeId" : 1, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 0, "closes" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 0, "inputSlot" : 9, "outSlot" : 10, "outIndexSlot" : 11, "preserveNullAndEmptyArrays" : 0, "inputStage" : { "stage" : "limit", "planNodeId" : 1, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 0, "closes" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 0, "inputStage" : { "stage" : "coscan", "planNodeId" : 1, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 0, "closes" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 0 } } } }, "innerStage" : { "stage" : "ixseek", "planNodeId" : 1, "nReturned" : 0, "executionTimeMillisEstimate" : 0, "opens" : 0, "closes" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 0, "indexName" : "a_1_b_1", "keysExamined" : 0, "seeks" : 0, "numReads" : 0, "recordIdSlot" : 6, "outputSlots" : [ NumberLong(3) ], "indexKeysToInclude" : "00000000000000000000000000000010", "seekKeyLow" : "s7 ", "seekKeyHigh" : "s8 " } } } } } } } }, "command" : { "aggregate" : "xxx", "pipeline" : [ { "$match" : { "a" : { "$ne" : 2 } } }, { "$match" : { "b" : { "$exists" : false } } }, { "$count" : "a" } ], "cursor" : { }, "$db" : "test" }, "serverInfo" : { "host" : "ip-10-0-106-40", "port" : 27017, "version" : "8.0.0-alpha", "gitVersion" : "2303b0fec38ba62b6199cd9e83932edd89c61fab" }, "serverParameters" : { "internalQueryFacetBufferSizeBytes" : 104857600, "internalQueryFacetMaxOutputDocSizeBytes" : 104857600, "internalLookupStageIntermediateDocumentMaxSizeBytes" : 104857600, "internalDocumentSourceGroupMaxMemoryBytes" : 104857600, "internalQueryMaxBlockingSortMemoryUsageBytes" : 104857600, "internalQueryProhibitBlockingMergeOnMongoS" : 0, "internalQueryMaxAddToSetBytes" : 104857600, "internalDocumentSourceSetWindowFieldsMaxMemoryBytes" : 104857600, "internalQueryFrameworkControl" : "trySbeEngine" }, "ok" : 1 }