{ "explainVersion" : "2", "queryPlanner" : { "namespace" : "myDB.myColl", "indexFilterSet" : false, "parsedQuery" : { "$and" : [ { "activeDay" : { "$eq" : "2024" } }, { "os" : { "$lt" : 9.0 } }, { "os" : { "$gt" : 0.0 } } ] }, "queryHash" : "F9395191", "planCacheKey" : "A4657C05", "optimizedPipeline" : true, "maxIndexedOrSolutionsReached" : false, "maxIndexedAndSolutionsReached" : false, "maxScansToExplodeReached" : false, "winningPlan" : { "queryPlan" : { "stage" : "GROUP", "planNodeId" : 3.0, "inputStage" : { "stage" : "PROJECTION_COVERED", "planNodeId" : 2.0, "transformBy" : { "appId" : true, "_id" : false }, "inputStage" : { "stage" : "IXSCAN", "planNodeId" : 1.0, "keyPattern" : { "activeDay" : 1.0, "os" : 1.0, "appId" : 1.0 }, "indexName" : "activeDay_1_os_1_appId_1", "isMultiKey" : true, "multiKeyPaths" : { "activeDay" : [ "activeDay" ], "os" : [ ], "appId" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2.0, "direction" : "forward", "indexBounds" : { "activeDay" : [ "[\"2024\", \"2024\"]" ], "os" : [ "(0, 9)" ], "appId" : [ "[MinKey, MaxKey]" ] } } } }, "slotBasedPlan" : { "slots" : "$$RESULT=s12 env: { s1 = TimeZoneDatabase(Asia/Istanbul...America/Nipigon) (timeZoneDB), s7 = KS(3C323032340029F0FE04), s2 = Nothing (SEARCH_META), s4 = 1735635923775 (NOW), s8 = KS(3C32303234002B120A0104), s3 = Timestamp(1735635922, 183) (CLUSTER_TIME) }", "stages" : "[3] project [s12 = newBsonObj(\"_id\", s9, \"value\", s10)] \n[3] group [s9] [s10 = sum(1)] spillSlots[s11] mergingExprs[sum(s11)] \n[3] project [s9 = (s5 ?: null)] \n[1] unique [s6] \n[1] cfilter {(exists(s7) && exists(s8))} \n[1] ixseek s7 s8 none s6 none none [s5 = 2] @\"50d3f897-6688-44b6-9bdb-ca787d6f2bc8\" @\"activeDay_1_os_1_appId_1\" true " } }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 62.0, "executionTimeMillis" : 8325.0, "totalKeysExamined" : 3725758.0, "totalDocsExamined" : 0.0, "executionStages" : { "stage" : "project", "planNodeId" : 3.0, "nReturned" : 62.0, "executionTimeMillisEstimate" : 8325.0, "opens" : 1.0, "closes" : 1.0, "saveState" : 3728.0, "restoreState" : 3728.0, "isEOF" : 1.0, "projections" : { "12" : "newBsonObj(\"_id\", s9, \"value\", s10) " }, "inputStage" : { "stage" : "group", "planNodeId" : 3.0, "nReturned" : 62.0, "executionTimeMillisEstimate" : 8325.0, "opens" : 1.0, "closes" : 1.0, "saveState" : 3728.0, "restoreState" : 3728.0, "isEOF" : 1.0, "groupBySlots" : [ NumberLong(9) ], "expressions" : { "10" : "sum(1) ", "initExprs" : { "10" : null } }, "mergingExprs" : { "11" : "sum(s11) " }, "usedDisk" : false, "spills" : 0.0, "spilledBytes" : 0.0, "spilledRecords" : 0.0, "spilledDataStorageSize" : 0.0, "inputStage" : { "stage" : "project", "planNodeId" : 3.0, "nReturned" : 3725758.0, "executionTimeMillisEstimate" : 8209.0, "opens" : 1.0, "closes" : 1.0, "saveState" : 3728.0, "restoreState" : 3728.0, "isEOF" : 1.0, "projections" : { "9" : "(s5 ?: null) " }, "inputStage" : { "stage" : "unique", "planNodeId" : 1.0, "nReturned" : 3725758.0, "executionTimeMillisEstimate" : 8185.0, "opens" : 1.0, "closes" : 1.0, "saveState" : 3728.0, "restoreState" : 3728.0, "isEOF" : 1.0, "dupsTested" : 3725758.0, "dupsDropped" : 0.0, "keySlots" : [ NumberLong(6) ], "inputStage" : { "stage" : "cfilter", "planNodeId" : 1.0, "nReturned" : 3725758.0, "executionTimeMillisEstimate" : 4574.0, "opens" : 1.0, "closes" : 1.0, "saveState" : 3728.0, "restoreState" : 3728.0, "isEOF" : 1.0, "numTested" : 1.0, "filter" : "(exists(s7) && exists(s8)) ", "inputStage" : { "stage" : "ixseek", "planNodeId" : 1.0, "nReturned" : 3725758.0, "executionTimeMillisEstimate" : 4569.0, "opens" : 1.0, "closes" : 1.0, "saveState" : 3728.0, "restoreState" : 3728.0, "isEOF" : 1.0, "indexName" : "activeDay_1_os_1_appId_1", "keysExamined" : 3725758.0, "seeks" : 1.0, "numReads" : 3725759.0, "recordIdSlot" : 6.0, "outputSlots" : [ NumberLong(5) ], "indexKeysToInclude" : "00000000000000000000000000000100", "seekKeyLow" : "s7 ", "seekKeyHigh" : "s8 " } } } } } } }, "command" : { "aggregate" : "myColl", "pipeline" : [ { "$match" : { "activeDay" : "2024", "os" : { "$gt" : 0.0, "$lt" : 9.0 } } }, { "$group" : { "_id" : "$appId", "value" : { "$count" : { } } } } ], "cursor" : { }, "$db" : "myDB" }, "serverInfo" : { "host" : "myHost", "port" : 27017.0, "version" : "7.0.15", "gitVersion" : "57939cc60865b0ce431c7e08c2589fa266a1a740" }, "serverParameters" : { "internalQueryFacetBufferSizeBytes" : 104857600.0, "internalQueryFacetMaxOutputDocSizeBytes" : 104857600.0, "internalLookupStageIntermediateDocumentMaxSizeBytes" : 104857600.0, "internalDocumentSourceGroupMaxMemoryBytes" : 104857600.0, "internalQueryMaxBlockingSortMemoryUsageBytes" : 104857600.0, "internalQueryProhibitBlockingMergeOnMongoS" : 0.0, "internalQueryMaxAddToSetBytes" : 104857600.0, "internalDocumentSourceSetWindowFieldsMaxMemoryBytes" : 104857600.0, "internalQueryFrameworkControl" : "trySbeRestricted" }, "ok" : 1.0, "$clusterTime" : { "clusterTime" : Timestamp(1735635931, 164), "signature" : { "hash" : BinData(0, "m1SCi/o4cbVKDpsT1mtaSrJrjaw="), "keyId" : NumberLong(7397444593077190837) } }, "operationTime" : Timestamp(1735635931, 164) }