{
  "blocks": [
    {
      "engine": "mongo",
      "rows": 200000,
      "iterations": 3,
      "sameApiOperations": [
        "Count3",
        "IndexedTagCount"
      ],
      "indexMs": 732.9939,
      "runtime": "9.0.19",
      "logicalCpus": 4,
      "bodyChars": {
        "min": 620,
        "max": 925
      },
      "inserts": [
        {
          "ms": 1616.1329,
          "managedBytes": 124151824
        },
        {
          "ms": 1611.0904,
          "managedBytes": 124239432
        },
        {
          "ms": 1538.5661,
          "managedBytes": 124140840
        }
      ],
      "compile": {
        "ms": 8.437
      },
      "measurements": [
        {
          "name": "Count0.ordinary",
          "medianMs": 44.0408,
          "samples": [
            {
              "ms": 44.0408,
              "managedBytes": 22432
            },
            {
              "ms": 43.7315,
              "managedBytes": 22432
            },
            {
              "ms": 44.1364,
              "managedBytes": 20760
            }
          ]
        },
        {
          "name": "Count0.optimized",
          "medianMs": 21.5581,
          "samples": [
            {
              "ms": 21.605,
              "managedBytes": 22480
            },
            {
              "ms": 21.5242,
              "managedBytes": 22480
            },
            {
              "ms": 21.5581,
              "managedBytes": 22440
            }
          ]
        },
        {
          "name": "Count1.ordinary",
          "medianMs": 5.3096,
          "samples": [
            {
              "ms": 5.3369,
              "managedBytes": 24800
            },
            {
              "ms": 5.3096,
              "managedBytes": 24800
            },
            {
              "ms": 5.1421,
              "managedBytes": 24752
            }
          ]
        },
        {
          "name": "Count1.optimized",
          "medianMs": 5.792,
          "samples": [
            {
              "ms": 5.792,
              "managedBytes": 24040
            },
            {
              "ms": 5.0627,
              "managedBytes": 24040
            },
            {
              "ms": 6.3378,
              "managedBytes": 22360
            }
          ]
        },
        {
          "name": "Count2.ordinary",
          "medianMs": 84.2882,
          "samples": [
            {
              "ms": 86.7986,
              "managedBytes": 27280
            },
            {
              "ms": 84.187,
              "managedBytes": 27232
            },
            {
              "ms": 84.2882,
              "managedBytes": 74608
            }
          ]
        },
        {
          "name": "Count2.optimized",
          "medianMs": 84.8526,
          "samples": [
            {
              "ms": 85.0522,
              "managedBytes": 25656
            },
            {
              "ms": 84.8526,
              "managedBytes": 24048
            },
            {
              "ms": 84.2982,
              "managedBytes": 25656
            }
          ]
        },
        {
          "name": "Count3.ordinary",
          "medianMs": 70.8274,
          "samples": [
            {
              "ms": 70.8274,
              "managedBytes": 24984
            },
            {
              "ms": 68.7966,
              "managedBytes": 24984
            },
            {
              "ms": 71.0227,
              "managedBytes": 24984
            }
          ]
        },
        {
          "name": "Page0.ordinary",
          "medianMs": 1.839,
          "samples": [
            {
              "ms": 2.826,
              "managedBytes": 236192
            },
            {
              "ms": 1.8152,
              "managedBytes": 236192
            },
            {
              "ms": 1.839,
              "managedBytes": 236192
            }
          ]
        },
        {
          "name": "Page0.optimized",
          "medianMs": 1.7246,
          "samples": [
            {
              "ms": 1.7081,
              "managedBytes": 234336
            },
            {
              "ms": 1.7246,
              "managedBytes": 234336
            },
            {
              "ms": 1.7479,
              "managedBytes": 234336
            }
          ]
        },
        {
          "name": "Page5000.ordinary",
          "medianMs": 34.8743,
          "samples": [
            {
              "ms": 34.8743,
              "managedBytes": 237040
            },
            {
              "ms": 34.6912,
              "managedBytes": 237040
            },
            {
              "ms": 35.8115,
              "managedBytes": 237040
            }
          ]
        },
        {
          "name": "Page5000.optimized",
          "medianMs": 25.093,
          "samples": [
            {
              "ms": 25.1016,
              "managedBytes": 235184
            },
            {
              "ms": 23.9678,
              "managedBytes": 235184
            },
            {
              "ms": 25.093,
              "managedBytes": 235184
            }
          ]
        },
        {
          "name": "Sequential10Pages.ordinary",
          "medianMs": 31.9671,
          "samples": [
            {
              "ms": 33.3792,
              "managedBytes": 2349328
            },
            {
              "ms": 30.5873,
              "managedBytes": 2349328
            },
            {
              "ms": 31.9671,
              "managedBytes": 2349328
            }
          ]
        },
        {
          "name": "Sequential10Pages.optimized",
          "medianMs": 30.8873,
          "samples": [
            {
              "ms": 30.8873,
              "managedBytes": 2333584
            },
            {
              "ms": 33.0475,
              "managedBytes": 2333584
            },
            {
              "ms": 29.8787,
              "managedBytes": 2333584
            }
          ]
        },
        {
          "name": "Random10Pages.ordinary",
          "medianMs": 1069.0443,
          "samples": [
            {
              "ms": 1091.4113,
              "managedBytes": 2406736
            },
            {
              "ms": 1066.0832,
              "managedBytes": 2357920
            },
            {
              "ms": 1069.0443,
              "managedBytes": 2357920
            }
          ]
        },
        {
          "name": "Random10Pages.optimized",
          "medianMs": 1060.6156,
          "samples": [
            {
              "ms": 1060.6156,
              "managedBytes": 2389808
            },
            {
              "ms": 1053.916,
              "managedBytes": 2342176
            },
            {
              "ms": 1060.8241,
              "managedBytes": 2389656
            }
          ]
        },
        {
          "name": "Point1000.ordinary",
          "medianMs": 98.0235,
          "samples": [
            {
              "ms": 107.262,
              "managedBytes": 25867552
            },
            {
              "ms": 98.0235,
              "managedBytes": 25856256
            },
            {
              "ms": 94.8606,
              "managedBytes": 25856256
            }
          ]
        },
        {
          "name": "Point1000.optimized",
          "medianMs": 132.3942,
          "samples": [
            {
              "ms": 142.8873,
              "managedBytes": 26175680
            },
            {
              "ms": 132.3942,
              "managedBytes": 26176256
            },
            {
              "ms": 126.1498,
              "managedBytes": 26175680
            }
          ]
        },
        {
          "name": "GroupBy.ordinary",
          "medianMs": 77.4475,
          "samples": [
            {
              "ms": 77.6307,
              "managedBytes": 27848
            },
            {
              "ms": 77.3806,
              "managedBytes": 27848
            },
            {
              "ms": 77.4475,
              "managedBytes": 27848
            }
          ]
        },
        {
          "name": "GroupBy.optimized",
          "medianMs": 54.2957,
          "samples": [
            {
              "ms": 54.446,
              "managedBytes": 24336
            },
            {
              "ms": 53.5186,
              "managedBytes": 65400
            },
            {
              "ms": 54.2957,
              "managedBytes": 24336
            }
          ]
        },
        {
          "name": "Concurrent4x50.ordinary",
          "medianMs": 252.5307,
          "samples": [
            {
              "ms": 264.641,
              "managedBytes": 4534336
            },
            {
              "ms": 246.8256,
              "managedBytes": 4529080
            },
            {
              "ms": 252.5307,
              "managedBytes": 4528336
            }
          ]
        },
        {
          "name": "Concurrent4x50.optimized",
          "medianMs": 277.4731,
          "samples": [
            {
              "ms": 277.4731,
              "managedBytes": 4396920
            },
            {
              "ms": 268.5478,
              "managedBytes": 4444360
            },
            {
              "ms": 287.5195,
              "managedBytes": 4398472
            }
          ]
        },
        {
          "name": "Write200Files",
          "medianMs": 800.6407,
          "samples": [
            {
              "ms": 800.6407,
              "managedBytes": 140102304
            },
            {
              "ms": 804.1984,
              "managedBytes": 140026368
            },
            {
              "ms": 799.3383,
              "managedBytes": 140026368
            }
          ]
        },
        {
          "name": "Read200x1KB",
          "medianMs": 52.7248,
          "samples": [
            {
              "ms": 52.7248,
              "managedBytes": 22913880
            },
            {
              "ms": 54.695,
              "managedBytes": 22908648
            },
            {
              "ms": 48.9295,
              "managedBytes": 22904280
            }
          ]
        },
        {
          "name": "RandomRead200x1KB.ordinary",
          "medianMs": 50.3417,
          "samples": [
            {
              "ms": 50.3417,
              "managedBytes": 22920576
            },
            {
              "ms": 52.3986,
              "managedBytes": 22920768
            },
            {
              "ms": 49.5652,
              "managedBytes": 22920576
            }
          ]
        },
        {
          "name": "RandomRead200x1KB.optimized",
          "medianMs": 49.5868,
          "samples": [
            {
              "ms": 57.3164,
              "managedBytes": 22920768
            },
            {
              "ms": 48.9303,
              "managedBytes": 22920576
            },
            {
              "ms": 49.5868,
              "managedBytes": 22920576
            }
          ]
        },
        {
          "name": "FileEditRange",
          "medianMs": 21.0751,
          "samples": [
            {
              "ms": 21.7815,
              "managedBytes": 20475936
            },
            {
              "ms": 21.0751,
              "managedBytes": 20477080
            },
            {
              "ms": 19.6264,
              "managedBytes": 20478240
            }
          ]
        },
        {
          "name": "FileExtendGap",
          "medianMs": 151.0706,
          "samples": [
            {
              "ms": 151.0706,
              "managedBytes": 218180432
            },
            {
              "ms": 135.8783,
              "managedBytes": 218140392
            },
            {
              "ms": 157.6877,
              "managedBytes": 218142752
            }
          ]
        },
        {
          "name": "FileGrow",
          "medianMs": 28.8991,
          "samples": [
            {
              "ms": 38.3274,
              "managedBytes": 33631304
            },
            {
              "ms": 27.4667,
              "managedBytes": 33628656
            },
            {
              "ms": 28.8991,
              "managedBytes": 33628472
            }
          ]
        },
        {
          "name": "FileTruncate",
          "medianMs": 14.1251,
          "samples": [
            {
              "ms": 14.0308,
              "managedBytes": 13883536
            },
            {
              "ms": 14.8863,
              "managedBytes": 13881656
            },
            {
              "ms": 14.1251,
              "managedBytes": 13882816
            }
          ]
        },
        {
          "name": "ComplexNativeUpdate",
          "medianMs": 201.9253,
          "samples": [
            {
              "ms": 205.8384,
              "managedBytes": 68608
            },
            {
              "ms": 201.9253,
              "managedBytes": 66344
            },
            {
              "ms": 201.0477,
              "managedBytes": 113632
            }
          ]
        },
        {
          "name": "IndexedTagCount.ordinary",
          "medianMs": 4.9604,
          "samples": [
            {
              "ms": 4.8815,
              "managedBytes": 26512
            },
            {
              "ms": 5.1047,
              "managedBytes": 26512
            },
            {
              "ms": 4.9604,
              "managedBytes": 26512
            }
          ]
        }
      ],
      "correctness": "all measured counts, full page fields/order, point results, groups, updates and file prefixes verified",
      "settings": {
        "Server": "8.3.11",
        "Driver": "3.11.2.0",
        "WriteConcern": "w:majority,j:true",
        "ReadConcern": "snapshot",
        "ReadPreference": "primary",
        "WriteTransactions": "one committed transaction per insert batch or bulk update",
        "Deployment": "single-node replica set, localhost bubblewrap"
      },
      "plans": [
        {
          "name": "Count0.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {}
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {},
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s6 env: {  }",
                  "stages": "[2] project [s6 = newBsonObj(\"_id\", s5, \"n\", s3)] \n[2] project [s5 = 1] \n[2] group [] [s3 = _internalCount::accumulate(s3, 1)] spillSlots[s4] mergingExprs[_internalCount::merge(s4)] \n[1] scan generic [s1 = record, s2 = recordId] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 48,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 43,
                "opens": 1,
                "closes": 1,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "projections": {
                  "6": "newBsonObj(\"_id\", s5, \"n\", s3) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 43,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 1,
                  "projections": {
                    "5": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 43,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "3": "_internalCount::accumulate(s3, 1) ",
                      "initExprs": {
                        "3": null,
                        "mergingExprs": {
                          "4": "_internalCount::merge(s4) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "scan",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 42,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 1,
                      "numReads": 200000,
                      "recordSlot": 1,
                      "recordIdSlot": 2,
                      "scanFieldNames": [],
                      "scanFieldSlots": []
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {}
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count0.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {}
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "_id_",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COUNT_SCAN",
                    "planNodeId": 1,
                    "keyPattern": {
                      "_id": 1
                    },
                    "indexName": "_id_",
                    "isMultiKey": false,
                    "isUnique": true,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "indexBounds": {
                      "startKey": {
                        "_id": {
                          "$minKey": 1
                        }
                      },
                      "startKeyInclusive": true,
                      "endKey": {
                        "_id": {
                          "$maxKey": 1
                        }
                      },
                      "endKeyInclusive": true
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s5 env: {  }",
                  "stages": "[2] project [s5 = newBsonObj(\"_id\", s4, \"n\", s2)] \n[2] project [s4 = 1] \n[2] group [] [s2 = _internalCount::accumulate(s2, 1)] spillSlots[s3] mergingExprs[_internalCount::merge(s3)] \n[1] ixseek seekKeyLow = KS(0A01) seekKeyHigh = KS(F0FE) [s1 = recordId] [] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" @\"_id_\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 25,
              "totalKeysExamined": 200000,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 19,
                "opens": 1,
                "closes": 1,
                "saveState": 1,
                "restoreState": 1,
                "isEOF": 1,
                "projections": {
                  "5": "newBsonObj(\"_id\", s4, \"n\", s2) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 19,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 1,
                  "restoreState": 1,
                  "isEOF": 1,
                  "projections": {
                    "4": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 19,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 1,
                    "restoreState": 1,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "2": "_internalCount::accumulate(s2, 1) ",
                      "initExprs": {
                        "2": null,
                        "mergingExprs": {
                          "3": "_internalCount::merge(s3) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "ixseek",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 19,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 1,
                      "restoreState": 1,
                      "isEOF": 1,
                      "indexName": "_id_",
                      "keysExamined": 200000,
                      "seeks": 1,
                      "numReads": 200001,
                      "recordIdSlot": 1,
                      "outputSlots": [],
                      "indexKeysToInclude": "00000000000000000000000000000000",
                      "seekKeyLow": "KS(0A01) ",
                      "seekKeyHigh": "KS(F0FE) "
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {}
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "_id_",
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count1.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "System": {
                    "$regularExpression": {
                      "pattern": "^ui\\ console",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "planNodeId": 1,
                    "keyPattern": {
                      "System": 1
                    },
                    "indexName": "System_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "System": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "System": [
                        "[\"ui console\", \"ui consolf\")",
                        "[/^ui\\ console/, /^ui\\ console/]"
                      ]
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s5 env: {  }",
                  "stages": "[2] project [s5 = newBsonObj(\"_id\", s4, \"n\", s2)] \n[2] project [s4 = 1] \n[2] group [] [s2 = _internalCount::accumulate(s2, 1)] spillSlots[s3] mergingExprs[_internalCount::merge(s3)] \n[1] ixscan_generic IndexBounds(\"field #0['System']: [CollationKey(0x756920636f6e736f6c65), CollationKey(0x756920636f6e736f6c66)), [/^ui\\ console/, /^ui\\ console/]\") [s1 = recordId] [] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" @\"System_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 5,
              "totalKeysExamined": 40001,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 0,
                "opens": 1,
                "closes": 1,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "projections": {
                  "5": "newBsonObj(\"_id\", s4, \"n\", s2) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 0,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 1,
                  "projections": {
                    "4": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 0,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "2": "_internalCount::accumulate(s2, 1) ",
                      "initExprs": {
                        "2": null,
                        "mergingExprs": {
                          "3": "_internalCount::merge(s3) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "ixscan_generic",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 0,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 0,
                      "restoreState": 0,
                      "isEOF": 1,
                      "indexName": "System_1",
                      "keysExamined": 40001,
                      "seeks": 2,
                      "numReads": 40002,
                      "keyCheckSkipped": 39999,
                      "recordIdSlot": 1,
                      "outputSlots": [],
                      "indexKeysToInclude": "00000000000000000000000000000000"
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "System": {
                      "$regularExpression": {
                        "pattern": "^ui\\ console",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count1.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "System": {
                    "$regularExpression": {
                      "pattern": "^ui\\ console",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "System_1",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "planNodeId": 1,
                    "keyPattern": {
                      "System": 1
                    },
                    "indexName": "System_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "System": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "System": [
                        "[\"ui console\", \"ui consolf\")",
                        "[/^ui\\ console/, /^ui\\ console/]"
                      ]
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s5 env: {  }",
                  "stages": "[2] project [s5 = newBsonObj(\"_id\", s4, \"n\", s2)] \n[2] project [s4 = 1] \n[2] group [] [s2 = _internalCount::accumulate(s2, 1)] spillSlots[s3] mergingExprs[_internalCount::merge(s3)] \n[1] ixscan_generic IndexBounds(\"field #0['System']: [CollationKey(0x756920636f6e736f6c65), CollationKey(0x756920636f6e736f6c66)), [/^ui\\ console/, /^ui\\ console/]\") [s1 = recordId] [] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" @\"System_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 5,
              "totalKeysExamined": 40001,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 3,
                "opens": 1,
                "closes": 1,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "projections": {
                  "5": "newBsonObj(\"_id\", s4, \"n\", s2) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 3,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 1,
                  "projections": {
                    "4": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 3,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "2": "_internalCount::accumulate(s2, 1) ",
                      "initExprs": {
                        "2": null,
                        "mergingExprs": {
                          "3": "_internalCount::merge(s3) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "ixscan_generic",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 3,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 0,
                      "restoreState": 0,
                      "isEOF": 1,
                      "indexName": "System_1",
                      "keysExamined": 40001,
                      "seeks": 2,
                      "numReads": 40002,
                      "keyCheckSkipped": 39999,
                      "recordIdSlot": 1,
                      "outputSlots": [],
                      "indexKeysToInclude": "00000000000000000000000000000000"
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "System": {
                      "$regularExpression": {
                        "pattern": "^ui\\ console",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "System_1",
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count2.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "MachineName": {
                    "$regularExpression": {
                      "pattern": "^NOD",
                      "options": ""
                    }
                  },
                  "AggId": {
                    "$regularExpression": {
                      "pattern": "^AB",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "$and": [
                  {
                    "AggId": {
                      "$regex": "^AB"
                    }
                  },
                  {
                    "MachineName": {
                      "$regex": "^NOD"
                    }
                  }
                ]
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "FETCH",
                    "planNodeId": 2,
                    "filter": {
                      "AggId": {
                        "$regex": "^AB"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "planNodeId": 1,
                      "keyPattern": {
                        "MachineName": 1
                      },
                      "indexName": "MachineName_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "MachineName": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "MachineName": [
                          "[\"NOD\", \"NOE\")",
                          "[/^NOD/, /^NOD/]"
                        ]
                      }
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s12 env: { s5 = {\"MachineName\" : 1} }",
                  "stages": "[3] project [s12 = newBsonObj(\"_id\", s11, \"n\", s9)] \n[3] project [s11 = 1] \n[3] group [] [s9 = _internalCount::accumulate(s9, 1)] spillSlots[s10] mergingExprs[_internalCount::merge(s10)] \n[2] filter {traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false)} \n[2] fetch s1 = seek, s6 = result, s7 = recordId, s4 = inSnapshotId, s2 = inIndexIdent, s3 = inIndexKey, s5 = inIndexKeyPattern [s8 = AggId] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" \n[1] ixscan_generic IndexBounds(\"field #0['MachineName']: [CollationKey(0x4e4f44), CollationKey(0x4e4f45)), [/^NOD/, /^NOD/]\") [s3 = indexKey, s1 = recordId, s4 = snapshotId, s2 = indexIdent] [] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" @\"MachineName_1\" forward "
                }
              },
              "rejectedPlans": [
                {
                  "isCached": false,
                  "stage": "FETCH",
                  "filter": {
                    "MachineName": {
                      "$regex": "^NOD"
                    }
                  },
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "AggId": 1
                    },
                    "indexName": "AggId_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "AggId": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "AggId": [
                        "[\"AB\", \"AC\")",
                        "[/^AB/, /^AB/]"
                      ]
                    }
                  }
                }
              ]
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 86,
              "totalKeysExamined": 80000,
              "totalDocsExamined": 80000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 1,
                "executionTimeMillisEstimate": 78,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "12": "newBsonObj(\"_id\", s11, \"n\", s9) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 3,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 78,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "projections": {
                    "11": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 3,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 78,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "9": "_internalCount::accumulate(s9, 1) ",
                      "initExprs": {
                        "9": null,
                        "mergingExprs": {
                          "10": "_internalCount::merge(s10) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 2,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 78,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numTested": 80000,
                      "filter": "traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false) ",
                      "inputStage": {
                        "stage": "fetch",
                        "planNodeId": 2,
                        "nReturned": 80000,
                        "executionTimeMillisEstimate": 66,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 4,
                        "restoreState": 4,
                        "isEOF": 1,
                        "numReads": 80000,
                        "inputStage": {
                          "stage": "ixscan_generic",
                          "planNodeId": 1,
                          "nReturned": 80000,
                          "executionTimeMillisEstimate": 10,
                          "opens": 1,
                          "closes": 1,
                          "saveState": 4,
                          "restoreState": 4,
                          "isEOF": 1,
                          "indexName": "MachineName_1",
                          "keysExamined": 80000,
                          "seeks": 1,
                          "numReads": 80001,
                          "keyCheckSkipped": 79999,
                          "indexKeySlot": 3,
                          "recordIdSlot": 1,
                          "snapshotIdSlot": 4,
                          "indexIdentSlot": 2,
                          "outputSlots": [],
                          "indexKeysToInclude": "00000000000000000000000000000000"
                        }
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "MachineName": {
                      "$regularExpression": {
                        "pattern": "^NOD",
                        "options": ""
                      }
                    },
                    "AggId": {
                      "$regularExpression": {
                        "pattern": "^AB",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count2.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "MachineName": {
                    "$regularExpression": {
                      "pattern": "^NOD",
                      "options": ""
                    }
                  },
                  "AggId": {
                    "$regularExpression": {
                      "pattern": "^AB",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "MachineName_1",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "$and": [
                  {
                    "AggId": {
                      "$regex": "^AB"
                    }
                  },
                  {
                    "MachineName": {
                      "$regex": "^NOD"
                    }
                  }
                ]
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "FETCH",
                    "planNodeId": 2,
                    "filter": {
                      "AggId": {
                        "$regex": "^AB"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "planNodeId": 1,
                      "keyPattern": {
                        "MachineName": 1
                      },
                      "indexName": "MachineName_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "MachineName": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "MachineName": [
                          "[\"NOD\", \"NOE\")",
                          "[/^NOD/, /^NOD/]"
                        ]
                      }
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s12 env: { s5 = {\"MachineName\" : 1} }",
                  "stages": "[3] project [s12 = newBsonObj(\"_id\", s11, \"n\", s9)] \n[3] project [s11 = 1] \n[3] group [] [s9 = _internalCount::accumulate(s9, 1)] spillSlots[s10] mergingExprs[_internalCount::merge(s10)] \n[2] filter {traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false)} \n[2] fetch s1 = seek, s6 = result, s7 = recordId, s4 = inSnapshotId, s2 = inIndexIdent, s3 = inIndexKey, s5 = inIndexKeyPattern [s8 = AggId] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" \n[1] ixscan_generic IndexBounds(\"field #0['MachineName']: [CollationKey(0x4e4f44), CollationKey(0x4e4f45)), [/^NOD/, /^NOD/]\") [s3 = indexKey, s1 = recordId, s4 = snapshotId, s2 = indexIdent] [] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" @\"MachineName_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 85,
              "totalKeysExamined": 80000,
              "totalDocsExamined": 80000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 1,
                "executionTimeMillisEstimate": 79,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "12": "newBsonObj(\"_id\", s11, \"n\", s9) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 3,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 79,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "projections": {
                    "11": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 3,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 79,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "9": "_internalCount::accumulate(s9, 1) ",
                      "initExprs": {
                        "9": null,
                        "mergingExprs": {
                          "10": "_internalCount::merge(s10) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 2,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 79,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numTested": 80000,
                      "filter": "traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false) ",
                      "inputStage": {
                        "stage": "fetch",
                        "planNodeId": 2,
                        "nReturned": 80000,
                        "executionTimeMillisEstimate": 73,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 4,
                        "restoreState": 4,
                        "isEOF": 1,
                        "numReads": 80000,
                        "inputStage": {
                          "stage": "ixscan_generic",
                          "planNodeId": 1,
                          "nReturned": 80000,
                          "executionTimeMillisEstimate": 24,
                          "opens": 1,
                          "closes": 1,
                          "saveState": 4,
                          "restoreState": 4,
                          "isEOF": 1,
                          "indexName": "MachineName_1",
                          "keysExamined": 80000,
                          "seeks": 1,
                          "numReads": 80001,
                          "keyCheckSkipped": 79999,
                          "indexKeySlot": 3,
                          "recordIdSlot": 1,
                          "snapshotIdSlot": 4,
                          "indexIdentSlot": 2,
                          "outputSlots": [],
                          "indexKeysToInclude": "00000000000000000000000000000000"
                        }
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "MachineName": {
                      "$regularExpression": {
                        "pattern": "^NOD",
                        "options": ""
                      }
                    },
                    "AggId": {
                      "$regularExpression": {
                        "pattern": "^AB",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "MachineName_1",
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count3.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "Tags": "NOK"
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "Tags": {
                  "$eq": "NOK"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {
                      "Tags": {
                        "$eq": "NOK"
                      }
                    },
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s7 env: {  }",
                  "stages": "[2] project [s7 = newBsonObj(\"_id\", s6, \"n\", s4)] \n[2] project [s6 = 1] \n[2] group [] [s4 = _internalCount::accumulate(s4, 1)] spillSlots[s5] mergingExprs[_internalCount::merge(s5)] \n[1] filter {traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false)} \n[1] scan generic [s1 = record, s2 = recordId] [s3 = Tags] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 70,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 64,
                "opens": 1,
                "closes": 1,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "projections": {
                  "7": "newBsonObj(\"_id\", s6, \"n\", s4) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 64,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 1,
                  "projections": {
                    "6": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 64,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "4": "_internalCount::accumulate(s4, 1) ",
                      "initExprs": {
                        "4": null,
                        "mergingExprs": {
                          "5": "_internalCount::merge(s5) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 64,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 1,
                      "numTested": 200000,
                      "filter": "traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false) ",
                      "inputStage": {
                        "stage": "scan",
                        "planNodeId": 1,
                        "nReturned": 200000,
                        "executionTimeMillisEstimate": 53,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 3,
                        "restoreState": 3,
                        "isEOF": 1,
                        "numReads": 200000,
                        "recordSlot": 1,
                        "recordIdSlot": 2,
                        "scanFieldNames": [
                          "Tags"
                        ],
                        "scanFieldSlots": [
                          3
                        ]
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "Tags": "NOK"
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count3.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "Tags": "NOK"
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "Tags": {
                  "$eq": "NOK"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {
                      "Tags": {
                        "$eq": "NOK"
                      }
                    },
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s7 env: {  }",
                  "stages": "[2] project [s7 = newBsonObj(\"_id\", s6, \"n\", s4)] \n[2] project [s6 = 1] \n[2] group [] [s4 = _internalCount::accumulate(s4, 1)] spillSlots[s5] mergingExprs[_internalCount::merge(s5)] \n[1] filter {traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false)} \n[1] scan generic [s1 = record, s2 = recordId] [s3 = Tags] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 70,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 67,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "7": "newBsonObj(\"_id\", s6, \"n\", s4) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 67,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "projections": {
                    "6": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 67,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "4": "_internalCount::accumulate(s4, 1) ",
                      "initExprs": {
                        "4": null,
                        "mergingExprs": {
                          "5": "_internalCount::merge(s5) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 67,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numTested": 200000,
                      "filter": "traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false) ",
                      "inputStage": {
                        "stage": "scan",
                        "planNodeId": 1,
                        "nReturned": 200000,
                        "executionTimeMillisEstimate": 51,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 4,
                        "restoreState": 4,
                        "isEOF": 1,
                        "numReads": 200000,
                        "recordSlot": 1,
                        "recordIdSlot": 2,
                        "scanFieldNames": [
                          "Tags"
                        ],
                        "scanFieldSlots": [
                          3
                        ]
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "Tags": "NOK"
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page0.ordinary",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "skip": 0,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 1,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    }
                  }
                }
              },
              "rejectedPlans": [
                {
                  "isCached": false,
                  "stage": "SORT",
                  "sortPattern": {
                    "UnixTimestamp": -1
                  },
                  "memLimit": 104857600,
                  "limitAmount": 100,
                  "type": "simple",
                  "inputStage": {
                    "stage": "FETCH",
                    "inputStage": {
                      "stage": "IXSCAN",
                      "keyPattern": {
                        "System": 1
                      },
                      "indexName": "System_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "System": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "System": [
                          "[\"ui console\", \"ui consolf\")",
                          "[/^ui\\ console/, /^ui\\ console/]"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 1,
              "totalKeysExamined": 500,
              "totalDocsExamined": 500,
              "executionStages": {
                "isCached": false,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 0,
                "works": 501,
                "advanced": 100,
                "needTime": 400,
                "needYield": 0,
                "saveState": 1,
                "restoreState": 1,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 0,
                  "works": 500,
                  "advanced": 100,
                  "needTime": 400,
                  "needYield": 0,
                  "saveState": 1,
                  "restoreState": 1,
                  "isEOF": 0,
                  "docsExamined": 500,
                  "alreadyHasObj": 0,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "nReturned": 500,
                    "executionTimeMillisEstimate": 0,
                    "works": 500,
                    "advanced": 500,
                    "needTime": 0,
                    "needYield": 0,
                    "saveState": 1,
                    "restoreState": 1,
                    "isEOF": 0,
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    },
                    "keysExamined": 500,
                    "seeks": 1,
                    "dupsTested": 0,
                    "dupsDropped": 0,
                    "peakTrackedMemBytes": 0
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "skip": 0,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page0.optimized",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "hint": "UnixTimestamp_1",
            "skip": 0,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    }
                  }
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 0,
              "totalKeysExamined": 500,
              "totalDocsExamined": 500,
              "executionStages": {
                "isCached": false,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 0,
                "works": 501,
                "advanced": 100,
                "needTime": 400,
                "needYield": 0,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 0,
                  "works": 500,
                  "advanced": 100,
                  "needTime": 400,
                  "needYield": 0,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 0,
                  "docsExamined": 500,
                  "alreadyHasObj": 0,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "nReturned": 500,
                    "executionTimeMillisEstimate": 0,
                    "works": 500,
                    "advanced": 500,
                    "needTime": 0,
                    "needYield": 0,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 0,
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    },
                    "keysExamined": 500,
                    "seeks": 1,
                    "dupsTested": 0,
                    "dupsDropped": 0,
                    "peakTrackedMemBytes": 0
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "hint": "UnixTimestamp_1",
              "skip": 0,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page5000.ordinary",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "skip": 5000,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 32,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": true,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      }
                    }
                  }
                }
              },
              "rejectedPlans": [
                {
                  "isCached": false,
                  "stage": "SKIP",
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "SORT",
                    "sortPattern": {
                      "UnixTimestamp": -1
                    },
                    "memLimit": 104857600,
                    "limitAmount": 5100,
                    "type": "simple",
                    "inputStage": {
                      "stage": "FETCH",
                      "inputStage": {
                        "stage": "IXSCAN",
                        "keyPattern": {
                          "System": 1
                        },
                        "indexName": "System_1",
                        "isMultiKey": false,
                        "multiKeyPaths": {
                          "System": []
                        },
                        "isUnique": false,
                        "isSparse": false,
                        "isPartial": false,
                        "indexVersion": 2,
                        "direction": "forward",
                        "indexBounds": {
                          "System": [
                            "[\"ui console\", \"ui consolf\")",
                            "[/^ui\\ console/, /^ui\\ console/]"
                          ]
                        }
                      }
                    }
                  }
                },
                {
                  "isCached": false,
                  "stage": "SKIP",
                  "costEstimate": 109.02973479510956,
                  "cardinalityEstimate": 100.0,
                  "estimatesMetadata": {
                    "ceSource": "Metadata"
                  },
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "SORT",
                    "costEstimate": 108.38129079510956,
                    "cardinalityEstimate": 5100.0,
                    "estimatesMetadata": {
                      "ceSource": "Metadata"
                    },
                    "sortPattern": {
                      "UnixTimestamp": -1
                    },
                    "memLimit": 104857600,
                    "limitAmount": 5100,
                    "type": "simple",
                    "inputStage": {
                      "stage": "FETCH",
                      "costEstimate": 64.0778452363158,
                      "cardinalityEstimate": 38421.05263157895,
                      "estimatesMetadata": {
                        "ceSource": "Sampling"
                      },
                      "inputStage": {
                        "stage": "IXSCAN",
                        "costEstimate": 16.73542418368421,
                        "cardinalityEstimate": 38421.05263157895,
                        "numKeysEstimate": 38421.05263157895,
                        "estimatesMetadata": {
                          "ceSource": "Sampling"
                        },
                        "keyPattern": {
                          "System": 1
                        },
                        "indexName": "System_1",
                        "isMultiKey": false,
                        "multiKeyPaths": {
                          "System": []
                        },
                        "isUnique": false,
                        "isSparse": false,
                        "isPartial": false,
                        "indexVersion": 2,
                        "direction": "forward",
                        "indexBounds": {
                          "System": [
                            "[\"ui console\", \"ui consolf\")",
                            "[/^ui\\ console/, /^ui\\ console/]"
                          ]
                        }
                      }
                    }
                  }
                }
              ]
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 33,
              "totalKeysExamined": 25500,
              "totalDocsExamined": 25500,
              "executionStages": {
                "isCached": true,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 26,
                "works": 25501,
                "advanced": 100,
                "needTime": 25400,
                "needYield": 0,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 26,
                  "works": 25500,
                  "advanced": 100,
                  "needTime": 25400,
                  "needYield": 0,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 0,
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "nReturned": 5100,
                    "executionTimeMillisEstimate": 26,
                    "works": 25500,
                    "advanced": 5100,
                    "needTime": 20400,
                    "needYield": 0,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 0,
                    "docsExamined": 25500,
                    "alreadyHasObj": 0,
                    "inputStage": {
                      "stage": "IXSCAN",
                      "nReturned": 25500,
                      "executionTimeMillisEstimate": 10,
                      "works": 25500,
                      "advanced": 25500,
                      "needTime": 0,
                      "needYield": 0,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 0,
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      },
                      "keysExamined": 25500,
                      "seeks": 1,
                      "dupsTested": 0,
                      "dupsDropped": 0,
                      "peakTrackedMemBytes": 0
                    }
                  }
                }
              }
            },
            "peakTrackedMemBytes": 3145728,
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "skip": 5000,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page5000.optimized",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "hint": "UnixTimestamp_1",
            "skip": 5000,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": true,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      }
                    }
                  }
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 24,
              "totalKeysExamined": 25500,
              "totalDocsExamined": 25500,
              "executionStages": {
                "isCached": true,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 18,
                "works": 25501,
                "advanced": 100,
                "needTime": 25400,
                "needYield": 0,
                "saveState": 1,
                "restoreState": 1,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 18,
                  "works": 25500,
                  "advanced": 100,
                  "needTime": 25400,
                  "needYield": 0,
                  "saveState": 1,
                  "restoreState": 1,
                  "isEOF": 0,
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "nReturned": 5100,
                    "executionTimeMillisEstimate": 18,
                    "works": 25500,
                    "advanced": 5100,
                    "needTime": 20400,
                    "needYield": 0,
                    "saveState": 1,
                    "restoreState": 1,
                    "isEOF": 0,
                    "docsExamined": 25500,
                    "alreadyHasObj": 0,
                    "inputStage": {
                      "stage": "IXSCAN",
                      "nReturned": 25500,
                      "executionTimeMillisEstimate": 10,
                      "works": 25500,
                      "advanced": 25500,
                      "needTime": 0,
                      "needYield": 0,
                      "saveState": 1,
                      "restoreState": 1,
                      "isEOF": 0,
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      },
                      "keysExamined": 25500,
                      "seeks": 1,
                      "dupsTested": 0,
                      "dupsDropped": 0,
                      "peakTrackedMemBytes": 0
                    }
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "hint": "UnixTimestamp_1",
              "skip": 5000,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Point.ordinary",
          "command": {
            "find": "events",
            "filter": {
              "_id": 1
            },
            "limit": 2,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "_id": {
                  "$eq": 1
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "EXPRESS_IXSCAN",
                "keyPattern": "{ _id: 1 }",
                "indexName": "_id_"
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 0,
              "totalKeysExamined": 1,
              "totalDocsExamined": 1,
              "executionStages": {
                "isCached": false,
                "stage": "EXPRESS_IXSCAN",
                "keyPattern": "{ _id: 1 }",
                "indexName": "_id_",
                "keysExamined": 1,
                "docsExamined": 1,
                "nReturned": 1
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "_id": 1
              },
              "limit": 2
            },
            "ok": 1.0
          }
        },
        {
          "name": "Point.optimized",
          "command": {
            "find": "events",
            "filter": {
              "_id": 1
            },
            "hint": "_id_",
            "limit": 2,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "_id": {
                  "$eq": 1
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "LIMIT",
                "limitAmount": 2,
                "inputStage": {
                  "stage": "FETCH",
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "_id": 1
                    },
                    "indexName": "_id_",
                    "isMultiKey": false,
                    "isUnique": true,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "_id": [
                        "[1, 1]"
                      ]
                    }
                  }
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 0,
              "totalKeysExamined": 1,
              "totalDocsExamined": 1,
              "executionStages": {
                "isCached": false,
                "stage": "LIMIT",
                "nReturned": 1,
                "executionTimeMillisEstimate": 0,
                "works": 2,
                "advanced": 1,
                "needTime": 0,
                "needYield": 0,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "limitAmount": 2,
                "inputStage": {
                  "stage": "FETCH",
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 0,
                  "works": 2,
                  "advanced": 1,
                  "needTime": 0,
                  "needYield": 0,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 1,
                  "docsExamined": 1,
                  "alreadyHasObj": 0,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 0,
                    "works": 2,
                    "advanced": 1,
                    "needTime": 0,
                    "needYield": 0,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 1,
                    "keyPattern": {
                      "_id": 1
                    },
                    "indexName": "_id_",
                    "isMultiKey": false,
                    "isUnique": true,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "_id": [
                        "[1, 1]"
                      ]
                    },
                    "keysExamined": 1,
                    "seeks": 1,
                    "dupsTested": 0,
                    "dupsDropped": 0,
                    "peakTrackedMemBytes": 0
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "_id": 1
              },
              "hint": "_id_",
              "limit": 2
            },
            "ok": 1.0
          }
        },
        {
          "name": "GroupBy.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$group": {
                  "_id": {
                    "$substrCP": [
                      "$Username",
                      0,
                      1
                    ]
                  },
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {},
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s7 env: {  }",
                  "stages": "[3] project [s7 = newBsonObj(\"_id\", s6, \"n\", s4)] \n[3] group [s6] [s4 = _internalCount::accumulate(s4, 1)] spillSlots[s5] mergingExprs[_internalCount::merge(s5)] \n[3] project [s6 = (substrCP(\n    if (typeMatch(s3, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s3) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s3) \n, 0, 1) ?: null)] \n[1] scan generic [s1 = record, s2 = recordId] [s3 = Username] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 5,
              "executionTimeMillis": 84,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 5,
                "executionTimeMillisEstimate": 84,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "7": "newBsonObj(\"_id\", s6, \"n\", s4) "
                },
                "inputStage": {
                  "stage": "group",
                  "planNodeId": 3,
                  "nReturned": 5,
                  "executionTimeMillisEstimate": 84,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "groupBySlots": [
                    6
                  ],
                  "expressions": {
                    "4": "_internalCount::accumulate(s4, 1) ",
                    "initExprs": {
                      "4": null,
                      "mergingExprs": {
                        "5": "_internalCount::merge(s5) "
                      }
                    }
                  },
                  "usedDisk": false,
                  "spills": 0,
                  "spilledBytes": 0,
                  "spilledRecords": 0,
                  "spilledDataStorageSize": 0,
                  "peakTrackedMemBytes": 250,
                  "inputStage": {
                    "stage": "project",
                    "planNodeId": 3,
                    "nReturned": 200000,
                    "executionTimeMillisEstimate": 74,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "projections": {
                      "6": "(substrCP(\n    if (typeMatch(s3, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s3) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s3) \n, 0, 1) ?: null) "
                    },
                    "inputStage": {
                      "stage": "scan",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 64,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numReads": 200000,
                      "recordSlot": 1,
                      "recordIdSlot": 2,
                      "scanFieldNames": [
                        "Username"
                      ],
                      "scanFieldSlots": [
                        3
                      ]
                    }
                  }
                }
              }
            },
            "peakTrackedMemBytes": 250,
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$group": {
                    "_id": {
                      "$substrCP": [
                        "$Username",
                        0,
                        1
                      ]
                    },
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "GroupBy.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$group": {
                  "_id": {
                    "$substrCP": [
                      "$Username",
                      0,
                      1
                    ]
                  },
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "Username_1",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "PROJECTION_COVERED",
                    "planNodeId": 2,
                    "transformBy": {
                      "Username": true,
                      "_id": false
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "planNodeId": 1,
                      "keyPattern": {
                        "Username": 1
                      },
                      "indexName": "Username_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "Username": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "Username": [
                          "[MinKey, MaxKey]"
                        ]
                      }
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s6 env: {  }",
                  "stages": "[3] project [s6 = newBsonObj(\"_id\", s5, \"n\", s3)] \n[3] group [s5] [s3 = _internalCount::accumulate(s3, 1)] spillSlots[s4] mergingExprs[_internalCount::merge(s4)] \n[3] project [s5 = (substrCP(\n    if (typeMatch(s2, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s2) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s2) \n, 0, 1) ?: null)] \n[1] ixseek seekKeyLow = KS(0A01) seekKeyHigh = KS(F0FE) [s1 = recordId] [s2 = 0] @\"ca21096c-bf7e-4fa4-ac8c-c79521b20447\" @\"Username_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 5,
              "executionTimeMillis": 63,
              "totalKeysExamined": 200000,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 5,
                "executionTimeMillisEstimate": 55,
                "opens": 1,
                "closes": 1,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "projections": {
                  "6": "newBsonObj(\"_id\", s5, \"n\", s3) "
                },
                "inputStage": {
                  "stage": "group",
                  "planNodeId": 3,
                  "nReturned": 5,
                  "executionTimeMillisEstimate": 55,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 1,
                  "groupBySlots": [
                    5
                  ],
                  "expressions": {
                    "3": "_internalCount::accumulate(s3, 1) ",
                    "initExprs": {
                      "3": null,
                      "mergingExprs": {
                        "4": "_internalCount::merge(s4) "
                      }
                    }
                  },
                  "usedDisk": false,
                  "spills": 0,
                  "spilledBytes": 0,
                  "spilledRecords": 0,
                  "spilledDataStorageSize": 0,
                  "peakTrackedMemBytes": 250,
                  "inputStage": {
                    "stage": "project",
                    "planNodeId": 3,
                    "nReturned": 200000,
                    "executionTimeMillisEstimate": 55,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 1,
                    "projections": {
                      "5": "(substrCP(\n    if (typeMatch(s2, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s2) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s2) \n, 0, 1) ?: null) "
                    },
                    "inputStage": {
                      "stage": "ixseek",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 36,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 1,
                      "indexName": "Username_1",
                      "keysExamined": 200000,
                      "seeks": 1,
                      "numReads": 200001,
                      "recordIdSlot": 1,
                      "outputSlots": [
                        2
                      ],
                      "indexKeysToInclude": "00000000000000000000000000000001",
                      "seekKeyLow": "KS(0A01) ",
                      "seekKeyHigh": "KS(F0FE) "
                    }
                  }
                }
              }
            },
            "peakTrackedMemBytes": 250,
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$group": {
                    "_id": {
                      "$substrCP": [
                        "$Username",
                        0,
                        1
                      ]
                    },
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "Username_1",
              "cursor": {}
            },
            "ok": 1.0
          }
        }
      ]
    },
    {
      "engine": "mongo",
      "rows": 200000,
      "iterations": 3,
      "sameApiOperations": [
        "Count3",
        "IndexedTagCount"
      ],
      "indexMs": 737.0498,
      "runtime": "9.0.19",
      "logicalCpus": 4,
      "bodyChars": {
        "min": 620,
        "max": 925
      },
      "inserts": [
        {
          "ms": 1647.7376,
          "managedBytes": 124153248
        },
        {
          "ms": 1643.2947,
          "managedBytes": 124218464
        },
        {
          "ms": 1643.3233,
          "managedBytes": 124146976
        }
      ],
      "compile": {
        "ms": 8.9259
      },
      "measurements": [
        {
          "name": "Count0.ordinary",
          "medianMs": 46.2987,
          "samples": [
            {
              "ms": 46.0127,
              "managedBytes": 22432
            },
            {
              "ms": 46.2987,
              "managedBytes": 22432
            },
            {
              "ms": 47.4776,
              "managedBytes": 22392
            }
          ]
        },
        {
          "name": "Count0.optimized",
          "medianMs": 23.2948,
          "samples": [
            {
              "ms": 24.2818,
              "managedBytes": 22480
            },
            {
              "ms": 23.1928,
              "managedBytes": 22480
            },
            {
              "ms": 23.2948,
              "managedBytes": 20760
            }
          ]
        },
        {
          "name": "Count1.ordinary",
          "medianMs": 5.377,
          "samples": [
            {
              "ms": 5.1501,
              "managedBytes": 24752
            },
            {
              "ms": 5.377,
              "managedBytes": 24752
            },
            {
              "ms": 5.8787,
              "managedBytes": 24752
            }
          ]
        },
        {
          "name": "Count1.optimized",
          "medianMs": 5.3838,
          "samples": [
            {
              "ms": 5.1927,
              "managedBytes": 23992
            },
            {
              "ms": 5.4134,
              "managedBytes": 23992
            },
            {
              "ms": 5.3838,
              "managedBytes": 23992
            }
          ]
        },
        {
          "name": "Count2.ordinary",
          "medianMs": 83.0794,
          "samples": [
            {
              "ms": 84.2523,
              "managedBytes": 27280
            },
            {
              "ms": 83.0794,
              "managedBytes": 27232
            },
            {
              "ms": 82.1303,
              "managedBytes": 27232
            }
          ]
        },
        {
          "name": "Count2.optimized",
          "medianMs": 84.3872,
          "samples": [
            {
              "ms": 82.8397,
              "managedBytes": 25656
            },
            {
              "ms": 84.3958,
              "managedBytes": 25680
            },
            {
              "ms": 84.3872,
              "managedBytes": 25368
            }
          ]
        },
        {
          "name": "Count3.ordinary",
          "medianMs": 69.1756,
          "samples": [
            {
              "ms": 69.081,
              "managedBytes": 24984
            },
            {
              "ms": 69.2096,
              "managedBytes": 24984
            },
            {
              "ms": 69.1756,
              "managedBytes": 24984
            }
          ]
        },
        {
          "name": "Page0.ordinary",
          "medianMs": 1.7687,
          "samples": [
            {
              "ms": 2.7316,
              "managedBytes": 236192
            },
            {
              "ms": 1.7687,
              "managedBytes": 236192
            },
            {
              "ms": 1.7314,
              "managedBytes": 236192
            }
          ]
        },
        {
          "name": "Page0.optimized",
          "medianMs": 1.696,
          "samples": [
            {
              "ms": 1.6675,
              "managedBytes": 234336
            },
            {
              "ms": 1.696,
              "managedBytes": 234336
            },
            {
              "ms": 1.82,
              "managedBytes": 234336
            }
          ]
        },
        {
          "name": "Page5000.ordinary",
          "medianMs": 33.8199,
          "samples": [
            {
              "ms": 33.4893,
              "managedBytes": 237040
            },
            {
              "ms": 34.4154,
              "managedBytes": 237040
            },
            {
              "ms": 33.8199,
              "managedBytes": 237040
            }
          ]
        },
        {
          "name": "Page5000.optimized",
          "medianMs": 24.4262,
          "samples": [
            {
              "ms": 24.7158,
              "managedBytes": 235184
            },
            {
              "ms": 24.4262,
              "managedBytes": 235184
            },
            {
              "ms": 23.7804,
              "managedBytes": 235184
            }
          ]
        },
        {
          "name": "Sequential10Pages.ordinary",
          "medianMs": 31.7716,
          "samples": [
            {
              "ms": 32.0951,
              "managedBytes": 2349328
            },
            {
              "ms": 31.7716,
              "managedBytes": 2349328
            },
            {
              "ms": 30.2424,
              "managedBytes": 2349328
            }
          ]
        },
        {
          "name": "Sequential10Pages.optimized",
          "medianMs": 31.5381,
          "samples": [
            {
              "ms": 31.621,
              "managedBytes": 2333584
            },
            {
              "ms": 31.2254,
              "managedBytes": 2333584
            },
            {
              "ms": 31.5381,
              "managedBytes": 2377152
            }
          ]
        },
        {
          "name": "Random10Pages.ordinary",
          "medianMs": 1062.6329,
          "samples": [
            {
              "ms": 1072.4708,
              "managedBytes": 2406736
            },
            {
              "ms": 1057.3807,
              "managedBytes": 2357920
            },
            {
              "ms": 1062.6329,
              "managedBytes": 2405400
            }
          ]
        },
        {
          "name": "Random10Pages.optimized",
          "medianMs": 1063.9248,
          "samples": [
            {
              "ms": 1063.9248,
              "managedBytes": 2389904
            },
            {
              "ms": 1067.1596,
              "managedBytes": 2342176
            },
            {
              "ms": 1059.0399,
              "managedBytes": 2342176
            }
          ]
        },
        {
          "name": "Point1000.ordinary",
          "medianMs": 94.4512,
          "samples": [
            {
              "ms": 109.6821,
              "managedBytes": 25867592
            },
            {
              "ms": 94.4512,
              "managedBytes": 25856256
            },
            {
              "ms": 94.0339,
              "managedBytes": 25856256
            }
          ]
        },
        {
          "name": "Point1000.optimized",
          "medianMs": 132.0641,
          "samples": [
            {
              "ms": 143.8199,
              "managedBytes": 26176064
            },
            {
              "ms": 132.0641,
              "managedBytes": 26176064
            },
            {
              "ms": 121.841,
              "managedBytes": 26176064
            }
          ]
        },
        {
          "name": "GroupBy.ordinary",
          "medianMs": 79.0889,
          "samples": [
            {
              "ms": 79.0889,
              "managedBytes": 75328
            },
            {
              "ms": 78.9392,
              "managedBytes": 27848
            },
            {
              "ms": 79.9169,
              "managedBytes": 27848
            }
          ]
        },
        {
          "name": "GroupBy.optimized",
          "medianMs": 54.3924,
          "samples": [
            {
              "ms": 54.3924,
              "managedBytes": 24336
            },
            {
              "ms": 54.1832,
              "managedBytes": 24336
            },
            {
              "ms": 55.5793,
              "managedBytes": 24336
            }
          ]
        },
        {
          "name": "Concurrent4x50.ordinary",
          "medianMs": 259.2452,
          "samples": [
            {
              "ms": 284.0674,
              "managedBytes": 4556144
            },
            {
              "ms": 258.0955,
              "managedBytes": 4528656
            },
            {
              "ms": 259.2452,
              "managedBytes": 4528504
            }
          ]
        },
        {
          "name": "Concurrent4x50.optimized",
          "medianMs": 252.1882,
          "samples": [
            {
              "ms": 246.8682,
              "managedBytes": 4397552
            },
            {
              "ms": 252.1882,
              "managedBytes": 4444736
            },
            {
              "ms": 263.7915,
              "managedBytes": 4397160
            }
          ]
        },
        {
          "name": "Write200Files",
          "medianMs": 802.534,
          "samples": [
            {
              "ms": 802.534,
              "managedBytes": 140093864
            },
            {
              "ms": 804.8167,
              "managedBytes": 140026368
            },
            {
              "ms": 798.7061,
              "managedBytes": 140026176
            }
          ]
        },
        {
          "name": "Read200x1KB",
          "medianMs": 52.5476,
          "samples": [
            {
              "ms": 52.5476,
              "managedBytes": 22913880
            },
            {
              "ms": 56.4903,
              "managedBytes": 22908216
            },
            {
              "ms": 48.6016,
              "managedBytes": 22904280
            }
          ]
        },
        {
          "name": "RandomRead200x1KB.ordinary",
          "medianMs": 51.3763,
          "samples": [
            {
              "ms": 51.3763,
              "managedBytes": 22920384
            },
            {
              "ms": 53.0423,
              "managedBytes": 22920576
            },
            {
              "ms": 50.4893,
              "managedBytes": 22920768
            }
          ]
        },
        {
          "name": "RandomRead200x1KB.optimized",
          "medianMs": 51.5567,
          "samples": [
            {
              "ms": 57.8962,
              "managedBytes": 22920192
            },
            {
              "ms": 49.3504,
              "managedBytes": 22920576
            },
            {
              "ms": 51.5567,
              "managedBytes": 22920384
            }
          ]
        },
        {
          "name": "FileEditRange",
          "medianMs": 20.1723,
          "samples": [
            {
              "ms": 21.4347,
              "managedBytes": 20480064
            },
            {
              "ms": 20.1723,
              "managedBytes": 20478592
            },
            {
              "ms": 19.5859,
              "managedBytes": 20478240
            }
          ]
        },
        {
          "name": "FileExtendGap",
          "medianMs": 167.9743,
          "samples": [
            {
              "ms": 165.8065,
              "managedBytes": 218160040
            },
            {
              "ms": 167.9743,
              "managedBytes": 218154736
            },
            {
              "ms": 220.8098,
              "managedBytes": 218217296
            }
          ]
        },
        {
          "name": "FileGrow",
          "medianMs": 29.8415,
          "samples": [
            {
              "ms": 29.8415,
              "managedBytes": 33654768
            },
            {
              "ms": 31.8992,
              "managedBytes": 33628112
            },
            {
              "ms": 25.6883,
              "managedBytes": 33627160
            }
          ]
        },
        {
          "name": "FileTruncate",
          "medianMs": 15.5559,
          "samples": [
            {
              "ms": 15.5559,
              "managedBytes": 13886088
            },
            {
              "ms": 22.2851,
              "managedBytes": 13883664
            },
            {
              "ms": 15.1571,
              "managedBytes": 13882616
            }
          ]
        },
        {
          "name": "ComplexNativeUpdate",
          "medianMs": 214.6772,
          "samples": [
            {
              "ms": 228.5537,
              "managedBytes": 68568
            },
            {
              "ms": 214.6772,
              "managedBytes": 113632
            },
            {
              "ms": 208.5113,
              "managedBytes": 66344
            }
          ]
        },
        {
          "name": "IndexedTagCount.ordinary",
          "medianMs": 4.9858,
          "samples": [
            {
              "ms": 5.3756,
              "managedBytes": 26512
            },
            {
              "ms": 4.9788,
              "managedBytes": 26512
            },
            {
              "ms": 4.9858,
              "managedBytes": 73272
            }
          ]
        }
      ],
      "correctness": "all measured counts, full page fields/order, point results, groups, updates and file prefixes verified",
      "settings": {
        "Server": "8.3.11",
        "Driver": "3.11.2.0",
        "WriteConcern": "w:majority,j:true",
        "ReadConcern": "snapshot",
        "ReadPreference": "primary",
        "WriteTransactions": "one committed transaction per insert batch or bulk update",
        "Deployment": "single-node replica set, localhost bubblewrap"
      },
      "plans": [
        {
          "name": "Count0.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {}
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {},
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s6 env: {  }",
                  "stages": "[2] project [s6 = newBsonObj(\"_id\", s5, \"n\", s3)] \n[2] project [s5 = 1] \n[2] group [] [s3 = _internalCount::accumulate(s3, 1)] spillSlots[s4] mergingExprs[_internalCount::merge(s4)] \n[1] scan generic [s1 = record, s2 = recordId] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 51,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 50,
                "opens": 1,
                "closes": 1,
                "saveState": 2,
                "restoreState": 2,
                "isEOF": 1,
                "projections": {
                  "6": "newBsonObj(\"_id\", s5, \"n\", s3) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 50,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 2,
                  "restoreState": 2,
                  "isEOF": 1,
                  "projections": {
                    "5": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 50,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 2,
                    "restoreState": 2,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "3": "_internalCount::accumulate(s3, 1) ",
                      "initExprs": {
                        "3": null,
                        "mergingExprs": {
                          "4": "_internalCount::merge(s4) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "scan",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 40,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 2,
                      "restoreState": 2,
                      "isEOF": 1,
                      "numReads": 200000,
                      "recordSlot": 1,
                      "recordIdSlot": 2,
                      "scanFieldNames": [],
                      "scanFieldSlots": []
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {}
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count0.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {}
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "_id_",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COUNT_SCAN",
                    "planNodeId": 1,
                    "keyPattern": {
                      "_id": 1
                    },
                    "indexName": "_id_",
                    "isMultiKey": false,
                    "isUnique": true,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "indexBounds": {
                      "startKey": {
                        "_id": {
                          "$minKey": 1
                        }
                      },
                      "startKeyInclusive": true,
                      "endKey": {
                        "_id": {
                          "$maxKey": 1
                        }
                      },
                      "endKeyInclusive": true
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s5 env: {  }",
                  "stages": "[2] project [s5 = newBsonObj(\"_id\", s4, \"n\", s2)] \n[2] project [s4 = 1] \n[2] group [] [s2 = _internalCount::accumulate(s2, 1)] spillSlots[s3] mergingExprs[_internalCount::merge(s3)] \n[1] ixseek seekKeyLow = KS(0A01) seekKeyHigh = KS(F0FE) [s1 = recordId] [] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" @\"_id_\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 27,
              "totalKeysExamined": 200000,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 20,
                "opens": 1,
                "closes": 1,
                "saveState": 1,
                "restoreState": 1,
                "isEOF": 1,
                "projections": {
                  "5": "newBsonObj(\"_id\", s4, \"n\", s2) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 20,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 1,
                  "restoreState": 1,
                  "isEOF": 1,
                  "projections": {
                    "4": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 20,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 1,
                    "restoreState": 1,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "2": "_internalCount::accumulate(s2, 1) ",
                      "initExprs": {
                        "2": null,
                        "mergingExprs": {
                          "3": "_internalCount::merge(s3) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "ixseek",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 10,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 1,
                      "restoreState": 1,
                      "isEOF": 1,
                      "indexName": "_id_",
                      "keysExamined": 200000,
                      "seeks": 1,
                      "numReads": 200001,
                      "recordIdSlot": 1,
                      "outputSlots": [],
                      "indexKeysToInclude": "00000000000000000000000000000000",
                      "seekKeyLow": "KS(0A01) ",
                      "seekKeyHigh": "KS(F0FE) "
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {}
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "_id_",
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count1.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "System": {
                    "$regularExpression": {
                      "pattern": "^ui\\ console",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "planNodeId": 1,
                    "keyPattern": {
                      "System": 1
                    },
                    "indexName": "System_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "System": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "System": [
                        "[\"ui console\", \"ui consolf\")",
                        "[/^ui\\ console/, /^ui\\ console/]"
                      ]
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s5 env: {  }",
                  "stages": "[2] project [s5 = newBsonObj(\"_id\", s4, \"n\", s2)] \n[2] project [s4 = 1] \n[2] group [] [s2 = _internalCount::accumulate(s2, 1)] spillSlots[s3] mergingExprs[_internalCount::merge(s3)] \n[1] ixscan_generic IndexBounds(\"field #0['System']: [CollationKey(0x756920636f6e736f6c65), CollationKey(0x756920636f6e736f6c66)), [/^ui\\ console/, /^ui\\ console/]\") [s1 = recordId] [] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" @\"System_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 5,
              "totalKeysExamined": 40001,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 5,
                "opens": 1,
                "closes": 1,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "projections": {
                  "5": "newBsonObj(\"_id\", s4, \"n\", s2) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 5,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 1,
                  "projections": {
                    "4": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 5,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "2": "_internalCount::accumulate(s2, 1) ",
                      "initExprs": {
                        "2": null,
                        "mergingExprs": {
                          "3": "_internalCount::merge(s3) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "ixscan_generic",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 5,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 0,
                      "restoreState": 0,
                      "isEOF": 1,
                      "indexName": "System_1",
                      "keysExamined": 40001,
                      "seeks": 2,
                      "numReads": 40002,
                      "keyCheckSkipped": 39999,
                      "recordIdSlot": 1,
                      "outputSlots": [],
                      "indexKeysToInclude": "00000000000000000000000000000000"
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "System": {
                      "$regularExpression": {
                        "pattern": "^ui\\ console",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count1.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "System": {
                    "$regularExpression": {
                      "pattern": "^ui\\ console",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "System_1",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "planNodeId": 1,
                    "keyPattern": {
                      "System": 1
                    },
                    "indexName": "System_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "System": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "System": [
                        "[\"ui console\", \"ui consolf\")",
                        "[/^ui\\ console/, /^ui\\ console/]"
                      ]
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s5 env: {  }",
                  "stages": "[2] project [s5 = newBsonObj(\"_id\", s4, \"n\", s2)] \n[2] project [s4 = 1] \n[2] group [] [s2 = _internalCount::accumulate(s2, 1)] spillSlots[s3] mergingExprs[_internalCount::merge(s3)] \n[1] ixscan_generic IndexBounds(\"field #0['System']: [CollationKey(0x756920636f6e736f6c65), CollationKey(0x756920636f6e736f6c66)), [/^ui\\ console/, /^ui\\ console/]\") [s1 = recordId] [] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" @\"System_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 5,
              "totalKeysExamined": 40001,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 5,
                "opens": 1,
                "closes": 1,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "projections": {
                  "5": "newBsonObj(\"_id\", s4, \"n\", s2) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 5,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 1,
                  "projections": {
                    "4": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 5,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "2": "_internalCount::accumulate(s2, 1) ",
                      "initExprs": {
                        "2": null,
                        "mergingExprs": {
                          "3": "_internalCount::merge(s3) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "ixscan_generic",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 5,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 0,
                      "restoreState": 0,
                      "isEOF": 1,
                      "indexName": "System_1",
                      "keysExamined": 40001,
                      "seeks": 2,
                      "numReads": 40002,
                      "keyCheckSkipped": 39999,
                      "recordIdSlot": 1,
                      "outputSlots": [],
                      "indexKeysToInclude": "00000000000000000000000000000000"
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "System": {
                      "$regularExpression": {
                        "pattern": "^ui\\ console",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "System_1",
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count2.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "MachineName": {
                    "$regularExpression": {
                      "pattern": "^NOD",
                      "options": ""
                    }
                  },
                  "AggId": {
                    "$regularExpression": {
                      "pattern": "^AB",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "$and": [
                  {
                    "AggId": {
                      "$regex": "^AB"
                    }
                  },
                  {
                    "MachineName": {
                      "$regex": "^NOD"
                    }
                  }
                ]
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "FETCH",
                    "planNodeId": 2,
                    "filter": {
                      "AggId": {
                        "$regex": "^AB"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "planNodeId": 1,
                      "keyPattern": {
                        "MachineName": 1
                      },
                      "indexName": "MachineName_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "MachineName": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "MachineName": [
                          "[\"NOD\", \"NOE\")",
                          "[/^NOD/, /^NOD/]"
                        ]
                      }
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s12 env: { s5 = {\"MachineName\" : 1} }",
                  "stages": "[3] project [s12 = newBsonObj(\"_id\", s11, \"n\", s9)] \n[3] project [s11 = 1] \n[3] group [] [s9 = _internalCount::accumulate(s9, 1)] spillSlots[s10] mergingExprs[_internalCount::merge(s10)] \n[2] filter {traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false)} \n[2] fetch s1 = seek, s6 = result, s7 = recordId, s4 = inSnapshotId, s2 = inIndexIdent, s3 = inIndexKey, s5 = inIndexKeyPattern [s8 = AggId] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" \n[1] ixscan_generic IndexBounds(\"field #0['MachineName']: [CollationKey(0x4e4f44), CollationKey(0x4e4f45)), [/^NOD/, /^NOD/]\") [s3 = indexKey, s1 = recordId, s4 = snapshotId, s2 = indexIdent] [] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" @\"MachineName_1\" forward "
                }
              },
              "rejectedPlans": [
                {
                  "isCached": false,
                  "stage": "FETCH",
                  "filter": {
                    "MachineName": {
                      "$regex": "^NOD"
                    }
                  },
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "AggId": 1
                    },
                    "indexName": "AggId_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "AggId": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "AggId": [
                        "[\"AB\", \"AC\")",
                        "[/^AB/, /^AB/]"
                      ]
                    }
                  }
                }
              ]
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 87,
              "totalKeysExamined": 80000,
              "totalDocsExamined": 80000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 1,
                "executionTimeMillisEstimate": 86,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "12": "newBsonObj(\"_id\", s11, \"n\", s9) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 3,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 86,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "projections": {
                    "11": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 3,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 86,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "9": "_internalCount::accumulate(s9, 1) ",
                      "initExprs": {
                        "9": null,
                        "mergingExprs": {
                          "10": "_internalCount::merge(s10) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 2,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 80,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numTested": 80000,
                      "filter": "traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false) ",
                      "inputStage": {
                        "stage": "fetch",
                        "planNodeId": 2,
                        "nReturned": 80000,
                        "executionTimeMillisEstimate": 38,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 4,
                        "restoreState": 4,
                        "isEOF": 1,
                        "numReads": 80000,
                        "inputStage": {
                          "stage": "ixscan_generic",
                          "planNodeId": 1,
                          "nReturned": 80000,
                          "executionTimeMillisEstimate": 10,
                          "opens": 1,
                          "closes": 1,
                          "saveState": 4,
                          "restoreState": 4,
                          "isEOF": 1,
                          "indexName": "MachineName_1",
                          "keysExamined": 80000,
                          "seeks": 1,
                          "numReads": 80001,
                          "keyCheckSkipped": 79999,
                          "indexKeySlot": 3,
                          "recordIdSlot": 1,
                          "snapshotIdSlot": 4,
                          "indexIdentSlot": 2,
                          "outputSlots": [],
                          "indexKeysToInclude": "00000000000000000000000000000000"
                        }
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "MachineName": {
                      "$regularExpression": {
                        "pattern": "^NOD",
                        "options": ""
                      }
                    },
                    "AggId": {
                      "$regularExpression": {
                        "pattern": "^AB",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count2.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "MachineName": {
                    "$regularExpression": {
                      "pattern": "^NOD",
                      "options": ""
                    }
                  },
                  "AggId": {
                    "$regularExpression": {
                      "pattern": "^AB",
                      "options": ""
                    }
                  }
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "MachineName_1",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "$and": [
                  {
                    "AggId": {
                      "$regex": "^AB"
                    }
                  },
                  {
                    "MachineName": {
                      "$regex": "^NOD"
                    }
                  }
                ]
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "FETCH",
                    "planNodeId": 2,
                    "filter": {
                      "AggId": {
                        "$regex": "^AB"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "planNodeId": 1,
                      "keyPattern": {
                        "MachineName": 1
                      },
                      "indexName": "MachineName_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "MachineName": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "MachineName": [
                          "[\"NOD\", \"NOE\")",
                          "[/^NOD/, /^NOD/]"
                        ]
                      }
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s12 env: { s5 = {\"MachineName\" : 1} }",
                  "stages": "[3] project [s12 = newBsonObj(\"_id\", s11, \"n\", s9)] \n[3] project [s11 = 1] \n[3] group [] [s9 = _internalCount::accumulate(s9, 1)] spillSlots[s10] mergingExprs[_internalCount::merge(s10)] \n[2] filter {traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false)} \n[2] fetch s1 = seek, s6 = result, s7 = recordId, s4 = inSnapshotId, s2 = inIndexIdent, s3 = inIndexKey, s5 = inIndexKeyPattern [s8 = AggId] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" \n[1] ixscan_generic IndexBounds(\"field #0['MachineName']: [CollationKey(0x4e4f44), CollationKey(0x4e4f45)), [/^NOD/, /^NOD/]\") [s3 = indexKey, s1 = recordId, s4 = snapshotId, s2 = indexIdent] [] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" @\"MachineName_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 90,
              "totalKeysExamined": 80000,
              "totalDocsExamined": 80000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 1,
                "executionTimeMillisEstimate": 83,
                "opens": 1,
                "closes": 1,
                "saveState": 5,
                "restoreState": 5,
                "isEOF": 1,
                "projections": {
                  "12": "newBsonObj(\"_id\", s11, \"n\", s9) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 3,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 83,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 5,
                  "restoreState": 5,
                  "isEOF": 1,
                  "projections": {
                    "11": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 3,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 83,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 5,
                    "restoreState": 5,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "9": "_internalCount::accumulate(s9, 1) ",
                      "initExprs": {
                        "9": null,
                        "mergingExprs": {
                          "10": "_internalCount::merge(s10) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 2,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 73,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 5,
                      "restoreState": 5,
                      "isEOF": 1,
                      "numTested": 80000,
                      "filter": "traverseF(s8, lambda(l2.0) { (((l2.0 == /^AB/) ?: false) || (regexMatch(PcreRegex(/^AB/), l2.0) ?: false)) }, false) ",
                      "inputStage": {
                        "stage": "fetch",
                        "planNodeId": 2,
                        "nReturned": 80000,
                        "executionTimeMillisEstimate": 62,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 5,
                        "restoreState": 5,
                        "isEOF": 1,
                        "numReads": 80000,
                        "inputStage": {
                          "stage": "ixscan_generic",
                          "planNodeId": 1,
                          "nReturned": 80000,
                          "executionTimeMillisEstimate": 15,
                          "opens": 1,
                          "closes": 1,
                          "saveState": 5,
                          "restoreState": 5,
                          "isEOF": 1,
                          "indexName": "MachineName_1",
                          "keysExamined": 80000,
                          "seeks": 1,
                          "numReads": 80001,
                          "keyCheckSkipped": 79999,
                          "indexKeySlot": 3,
                          "recordIdSlot": 1,
                          "snapshotIdSlot": 4,
                          "indexIdentSlot": 2,
                          "outputSlots": [],
                          "indexKeysToInclude": "00000000000000000000000000000000"
                        }
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "MachineName": {
                      "$regularExpression": {
                        "pattern": "^NOD",
                        "options": ""
                      }
                    },
                    "AggId": {
                      "$regularExpression": {
                        "pattern": "^AB",
                        "options": ""
                      }
                    }
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "MachineName_1",
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count3.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "Tags": "NOK"
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "Tags": {
                  "$eq": "NOK"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {
                      "Tags": {
                        "$eq": "NOK"
                      }
                    },
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s7 env: {  }",
                  "stages": "[2] project [s7 = newBsonObj(\"_id\", s6, \"n\", s4)] \n[2] project [s6 = 1] \n[2] group [] [s4 = _internalCount::accumulate(s4, 1)] spillSlots[s5] mergingExprs[_internalCount::merge(s5)] \n[1] filter {traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false)} \n[1] scan generic [s1 = record, s2 = recordId] [s3 = Tags] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 76,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 69,
                "opens": 1,
                "closes": 1,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "projections": {
                  "7": "newBsonObj(\"_id\", s6, \"n\", s4) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 69,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 1,
                  "projections": {
                    "6": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 69,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "4": "_internalCount::accumulate(s4, 1) ",
                      "initExprs": {
                        "4": null,
                        "mergingExprs": {
                          "5": "_internalCount::merge(s5) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 69,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 1,
                      "numTested": 200000,
                      "filter": "traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false) ",
                      "inputStage": {
                        "stage": "scan",
                        "planNodeId": 1,
                        "nReturned": 200000,
                        "executionTimeMillisEstimate": 41,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 3,
                        "restoreState": 3,
                        "isEOF": 1,
                        "numReads": 200000,
                        "recordSlot": 1,
                        "recordIdSlot": 2,
                        "scanFieldNames": [
                          "Tags"
                        ],
                        "scanFieldSlots": [
                          3
                        ]
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "Tags": "NOK"
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Count3.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$match": {
                  "Tags": "NOK"
                }
              },
              {
                "$group": {
                  "_id": 1,
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {
                "Tags": {
                  "$eq": "NOK"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 2,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {
                      "Tags": {
                        "$eq": "NOK"
                      }
                    },
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s7 env: {  }",
                  "stages": "[2] project [s7 = newBsonObj(\"_id\", s6, \"n\", s4)] \n[2] project [s6 = 1] \n[2] group [] [s4 = _internalCount::accumulate(s4, 1)] spillSlots[s5] mergingExprs[_internalCount::merge(s5)] \n[1] filter {traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false)} \n[1] scan generic [s1 = record, s2 = recordId] [s3 = Tags] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 72,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 2,
                "nReturned": 1,
                "executionTimeMillisEstimate": 69,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "7": "newBsonObj(\"_id\", s6, \"n\", s4) "
                },
                "inputStage": {
                  "stage": "project",
                  "planNodeId": 2,
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 69,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "projections": {
                    "6": "1 "
                  },
                  "inputStage": {
                    "stage": "group",
                    "planNodeId": 2,
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 69,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "groupBySlots": [],
                    "expressions": {
                      "4": "_internalCount::accumulate(s4, 1) ",
                      "initExprs": {
                        "4": null,
                        "mergingExprs": {
                          "5": "_internalCount::merge(s5) "
                        }
                      }
                    },
                    "usedDisk": false,
                    "spills": 0,
                    "spilledBytes": 0,
                    "spilledRecords": 0,
                    "spilledDataStorageSize": 0,
                    "peakTrackedMemBytes": 0,
                    "inputStage": {
                      "stage": "filter",
                      "planNodeId": 1,
                      "nReturned": 40000,
                      "executionTimeMillisEstimate": 69,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numTested": 200000,
                      "filter": "traverseF(s3, lambda(l2.0) { ((move(l2.0) == \"NOK\") ?: false) }, false) ",
                      "inputStage": {
                        "stage": "scan",
                        "planNodeId": 1,
                        "nReturned": 200000,
                        "executionTimeMillisEstimate": 51,
                        "opens": 1,
                        "closes": 1,
                        "saveState": 4,
                        "restoreState": 4,
                        "isEOF": 1,
                        "numReads": 200000,
                        "recordSlot": 1,
                        "recordIdSlot": 2,
                        "scanFieldNames": [
                          "Tags"
                        ],
                        "scanFieldSlots": [
                          3
                        ]
                      }
                    }
                  }
                }
              }
            },
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$match": {
                    "Tags": "NOK"
                  }
                },
                {
                  "$group": {
                    "_id": 1,
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page0.ordinary",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "skip": 0,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 1,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    }
                  }
                }
              },
              "rejectedPlans": [
                {
                  "isCached": false,
                  "stage": "SORT",
                  "sortPattern": {
                    "UnixTimestamp": -1
                  },
                  "memLimit": 104857600,
                  "limitAmount": 100,
                  "type": "simple",
                  "inputStage": {
                    "stage": "FETCH",
                    "inputStage": {
                      "stage": "IXSCAN",
                      "keyPattern": {
                        "System": 1
                      },
                      "indexName": "System_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "System": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "System": [
                          "[\"ui console\", \"ui consolf\")",
                          "[/^ui\\ console/, /^ui\\ console/]"
                        ]
                      }
                    }
                  }
                }
              ]
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 1,
              "totalKeysExamined": 500,
              "totalDocsExamined": 500,
              "executionStages": {
                "isCached": false,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 0,
                "works": 501,
                "advanced": 100,
                "needTime": 400,
                "needYield": 0,
                "saveState": 1,
                "restoreState": 1,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 0,
                  "works": 500,
                  "advanced": 100,
                  "needTime": 400,
                  "needYield": 0,
                  "saveState": 1,
                  "restoreState": 1,
                  "isEOF": 0,
                  "docsExamined": 500,
                  "alreadyHasObj": 0,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "nReturned": 500,
                    "executionTimeMillisEstimate": 0,
                    "works": 500,
                    "advanced": 500,
                    "needTime": 0,
                    "needYield": 0,
                    "saveState": 1,
                    "restoreState": 1,
                    "isEOF": 0,
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    },
                    "keysExamined": 500,
                    "seeks": 1,
                    "dupsTested": 0,
                    "dupsDropped": 0,
                    "peakTrackedMemBytes": 0
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "skip": 0,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page0.optimized",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "hint": "UnixTimestamp_1",
            "skip": 0,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    }
                  }
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 0,
              "totalKeysExamined": 500,
              "totalDocsExamined": 500,
              "executionStages": {
                "isCached": false,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 1,
                "works": 501,
                "advanced": 100,
                "needTime": 400,
                "needYield": 0,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "FETCH",
                  "filter": {
                    "System": {
                      "$regex": "^ui\\ console"
                    }
                  },
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 1,
                  "works": 500,
                  "advanced": 100,
                  "needTime": 400,
                  "needYield": 0,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 0,
                  "docsExamined": 500,
                  "alreadyHasObj": 0,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "nReturned": 500,
                    "executionTimeMillisEstimate": 0,
                    "works": 500,
                    "advanced": 500,
                    "needTime": 0,
                    "needYield": 0,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 0,
                    "keyPattern": {
                      "UnixTimestamp": 1
                    },
                    "indexName": "UnixTimestamp_1",
                    "isMultiKey": false,
                    "multiKeyPaths": {
                      "UnixTimestamp": []
                    },
                    "isUnique": false,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "backward",
                    "indexBounds": {
                      "UnixTimestamp": [
                        "[MaxKey, MinKey]"
                      ]
                    },
                    "keysExamined": 500,
                    "seeks": 1,
                    "dupsTested": 0,
                    "dupsDropped": 0,
                    "peakTrackedMemBytes": 0
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "hint": "UnixTimestamp_1",
              "skip": 0,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page5000.ordinary",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "skip": 5000,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 32,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": true,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      }
                    }
                  }
                }
              },
              "rejectedPlans": [
                {
                  "isCached": false,
                  "stage": "SKIP",
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "SORT",
                    "sortPattern": {
                      "UnixTimestamp": -1
                    },
                    "memLimit": 104857600,
                    "limitAmount": 5100,
                    "type": "simple",
                    "inputStage": {
                      "stage": "FETCH",
                      "inputStage": {
                        "stage": "IXSCAN",
                        "keyPattern": {
                          "System": 1
                        },
                        "indexName": "System_1",
                        "isMultiKey": false,
                        "multiKeyPaths": {
                          "System": []
                        },
                        "isUnique": false,
                        "isSparse": false,
                        "isPartial": false,
                        "indexVersion": 2,
                        "direction": "forward",
                        "indexBounds": {
                          "System": [
                            "[\"ui console\", \"ui consolf\")",
                            "[/^ui\\ console/, /^ui\\ console/]"
                          ]
                        }
                      }
                    }
                  }
                },
                {
                  "isCached": false,
                  "stage": "SKIP",
                  "costEstimate": 113.05809422623207,
                  "cardinalityEstimate": 100.0,
                  "estimatesMetadata": {
                    "ceSource": "Metadata"
                  },
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "SORT",
                    "costEstimate": 112.40965022623207,
                    "cardinalityEstimate": 5100.0,
                    "estimatesMetadata": {
                      "ceSource": "Metadata"
                    },
                    "sortPattern": {
                      "UnixTimestamp": -1
                    },
                    "memLimit": 104857600,
                    "limitAmount": 5100,
                    "type": "simple",
                    "inputStage": {
                      "stage": "FETCH",
                      "costEstimate": 66.71113471000001,
                      "cardinalityEstimate": 40000.0,
                      "estimatesMetadata": {
                        "ceSource": "Sampling"
                      },
                      "inputStage": {
                        "stage": "IXSCAN",
                        "costEstimate": 17.42313471,
                        "cardinalityEstimate": 40000.0,
                        "numKeysEstimate": 40000.0,
                        "estimatesMetadata": {
                          "ceSource": "Sampling"
                        },
                        "keyPattern": {
                          "System": 1
                        },
                        "indexName": "System_1",
                        "isMultiKey": false,
                        "multiKeyPaths": {
                          "System": []
                        },
                        "isUnique": false,
                        "isSparse": false,
                        "isPartial": false,
                        "indexVersion": 2,
                        "direction": "forward",
                        "indexBounds": {
                          "System": [
                            "[\"ui console\", \"ui consolf\")",
                            "[/^ui\\ console/, /^ui\\ console/]"
                          ]
                        }
                      }
                    }
                  }
                }
              ]
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 32,
              "totalKeysExamined": 25500,
              "totalDocsExamined": 25500,
              "executionStages": {
                "isCached": true,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 20,
                "works": 25501,
                "advanced": 100,
                "needTime": 25400,
                "needYield": 0,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 20,
                  "works": 25500,
                  "advanced": 100,
                  "needTime": 25400,
                  "needYield": 0,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 0,
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "nReturned": 5100,
                    "executionTimeMillisEstimate": 20,
                    "works": 25500,
                    "advanced": 5100,
                    "needTime": 20400,
                    "needYield": 0,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 0,
                    "docsExamined": 25500,
                    "alreadyHasObj": 0,
                    "inputStage": {
                      "stage": "IXSCAN",
                      "nReturned": 25500,
                      "executionTimeMillisEstimate": 20,
                      "works": 25500,
                      "advanced": 25500,
                      "needTime": 0,
                      "needYield": 0,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 0,
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      },
                      "keysExamined": 25500,
                      "seeks": 1,
                      "dupsTested": 0,
                      "dupsDropped": 0,
                      "peakTrackedMemBytes": 0
                    }
                  }
                }
              }
            },
            "peakTrackedMemBytes": 3145728,
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "skip": 5000,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Page5000.optimized",
          "command": {
            "find": "events",
            "filter": {
              "System": {
                "$regularExpression": {
                  "pattern": "^ui\\ console",
                  "options": ""
                }
              }
            },
            "sort": {
              "UnixTimestamp": -1
            },
            "hint": "UnixTimestamp_1",
            "skip": 5000,
            "limit": 100,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "System": {
                  "$regex": "^ui\\ console"
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": true,
                "stage": "LIMIT",
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      }
                    }
                  }
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 100,
              "executionTimeMillis": 24,
              "totalKeysExamined": 25500,
              "totalDocsExamined": 25500,
              "executionStages": {
                "isCached": true,
                "stage": "LIMIT",
                "nReturned": 100,
                "executionTimeMillisEstimate": 19,
                "works": 25501,
                "advanced": 100,
                "needTime": 25400,
                "needYield": 0,
                "saveState": 1,
                "restoreState": 1,
                "isEOF": 1,
                "limitAmount": 100,
                "inputStage": {
                  "stage": "SKIP",
                  "nReturned": 100,
                  "executionTimeMillisEstimate": 19,
                  "works": 25500,
                  "advanced": 100,
                  "needTime": 25400,
                  "needYield": 0,
                  "saveState": 1,
                  "restoreState": 1,
                  "isEOF": 0,
                  "skipAmount": 5000,
                  "inputStage": {
                    "stage": "FETCH",
                    "filter": {
                      "System": {
                        "$regex": "^ui\\ console"
                      }
                    },
                    "nReturned": 5100,
                    "executionTimeMillisEstimate": 19,
                    "works": 25500,
                    "advanced": 5100,
                    "needTime": 20400,
                    "needYield": 0,
                    "saveState": 1,
                    "restoreState": 1,
                    "isEOF": 0,
                    "docsExamined": 25500,
                    "alreadyHasObj": 0,
                    "inputStage": {
                      "stage": "IXSCAN",
                      "nReturned": 25500,
                      "executionTimeMillisEstimate": 0,
                      "works": 25500,
                      "advanced": 25500,
                      "needTime": 0,
                      "needYield": 0,
                      "saveState": 1,
                      "restoreState": 1,
                      "isEOF": 0,
                      "keyPattern": {
                        "UnixTimestamp": 1
                      },
                      "indexName": "UnixTimestamp_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "UnixTimestamp": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "backward",
                      "indexBounds": {
                        "UnixTimestamp": [
                          "[MaxKey, MinKey]"
                        ]
                      },
                      "keysExamined": 25500,
                      "seeks": 1,
                      "dupsTested": 0,
                      "dupsDropped": 0,
                      "peakTrackedMemBytes": 0
                    }
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "System": {
                  "$regularExpression": {
                    "pattern": "^ui\\ console",
                    "options": ""
                  }
                }
              },
              "sort": {
                "UnixTimestamp": -1
              },
              "hint": "UnixTimestamp_1",
              "skip": 5000,
              "limit": 100
            },
            "ok": 1.0
          }
        },
        {
          "name": "Point.ordinary",
          "command": {
            "find": "events",
            "filter": {
              "_id": 1
            },
            "limit": 2,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "_id": {
                  "$eq": 1
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "EXPRESS_IXSCAN",
                "keyPattern": "{ _id: 1 }",
                "indexName": "_id_"
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 0,
              "totalKeysExamined": 1,
              "totalDocsExamined": 1,
              "executionStages": {
                "isCached": false,
                "stage": "EXPRESS_IXSCAN",
                "keyPattern": "{ _id: 1 }",
                "indexName": "_id_",
                "keysExamined": 1,
                "docsExamined": 1,
                "nReturned": 1
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "_id": 1
              },
              "limit": 2
            },
            "ok": 1.0
          }
        },
        {
          "name": "Point.optimized",
          "command": {
            "find": "events",
            "filter": {
              "_id": 1
            },
            "hint": "_id_",
            "limit": 2,
            "readConcern": {
              "level": "snapshot"
            }
          },
          "plan": {
            "explainVersion": "1",
            "queryPlanner": {
              "parsedQuery": {
                "_id": {
                  "$eq": 1
                }
              },
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "stage": "LIMIT",
                "limitAmount": 2,
                "inputStage": {
                  "stage": "FETCH",
                  "inputStage": {
                    "stage": "IXSCAN",
                    "keyPattern": {
                      "_id": 1
                    },
                    "indexName": "_id_",
                    "isMultiKey": false,
                    "isUnique": true,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "_id": [
                        "[1, 1]"
                      ]
                    }
                  }
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 1,
              "executionTimeMillis": 0,
              "totalKeysExamined": 1,
              "totalDocsExamined": 1,
              "executionStages": {
                "isCached": false,
                "stage": "LIMIT",
                "nReturned": 1,
                "executionTimeMillisEstimate": 0,
                "works": 2,
                "advanced": 1,
                "needTime": 0,
                "needYield": 0,
                "saveState": 0,
                "restoreState": 0,
                "isEOF": 1,
                "limitAmount": 2,
                "inputStage": {
                  "stage": "FETCH",
                  "nReturned": 1,
                  "executionTimeMillisEstimate": 0,
                  "works": 2,
                  "advanced": 1,
                  "needTime": 0,
                  "needYield": 0,
                  "saveState": 0,
                  "restoreState": 0,
                  "isEOF": 1,
                  "docsExamined": 1,
                  "alreadyHasObj": 0,
                  "inputStage": {
                    "stage": "IXSCAN",
                    "nReturned": 1,
                    "executionTimeMillisEstimate": 0,
                    "works": 2,
                    "advanced": 1,
                    "needTime": 0,
                    "needYield": 0,
                    "saveState": 0,
                    "restoreState": 0,
                    "isEOF": 1,
                    "keyPattern": {
                      "_id": 1
                    },
                    "indexName": "_id_",
                    "isMultiKey": false,
                    "isUnique": true,
                    "isSparse": false,
                    "isPartial": false,
                    "indexVersion": 2,
                    "direction": "forward",
                    "indexBounds": {
                      "_id": [
                        "[1, 1]"
                      ]
                    },
                    "keysExamined": 1,
                    "seeks": 1,
                    "dupsTested": 0,
                    "dupsDropped": 0,
                    "peakTrackedMemBytes": 0
                  }
                }
              }
            },
            "command": {
              "find": "events",
              "filter": {
                "_id": 1
              },
              "hint": "_id_",
              "limit": 2
            },
            "ok": 1.0
          }
        },
        {
          "name": "GroupBy.ordinary",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$group": {
                  "_id": {
                    "$substrCP": [
                      "$Username",
                      0,
                      1
                    ]
                  },
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "COLLSCAN",
                    "planNodeId": 1,
                    "filter": {},
                    "direction": "forward"
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s7 env: {  }",
                  "stages": "[3] project [s7 = newBsonObj(\"_id\", s6, \"n\", s4)] \n[3] group [s6] [s4 = _internalCount::accumulate(s4, 1)] spillSlots[s5] mergingExprs[_internalCount::merge(s5)] \n[3] project [s6 = (substrCP(\n    if (typeMatch(s3, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s3) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s3) \n, 0, 1) ?: null)] \n[1] scan generic [s1 = record, s2 = recordId] [s3 = Username] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 5,
              "executionTimeMillis": 86,
              "totalKeysExamined": 0,
              "totalDocsExamined": 200000,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 5,
                "executionTimeMillisEstimate": 84,
                "opens": 1,
                "closes": 1,
                "saveState": 4,
                "restoreState": 4,
                "isEOF": 1,
                "projections": {
                  "7": "newBsonObj(\"_id\", s6, \"n\", s4) "
                },
                "inputStage": {
                  "stage": "group",
                  "planNodeId": 3,
                  "nReturned": 5,
                  "executionTimeMillisEstimate": 84,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 4,
                  "restoreState": 4,
                  "isEOF": 1,
                  "groupBySlots": [
                    6
                  ],
                  "expressions": {
                    "4": "_internalCount::accumulate(s4, 1) ",
                    "initExprs": {
                      "4": null,
                      "mergingExprs": {
                        "5": "_internalCount::merge(s5) "
                      }
                    }
                  },
                  "usedDisk": false,
                  "spills": 0,
                  "spilledBytes": 0,
                  "spilledRecords": 0,
                  "spilledDataStorageSize": 0,
                  "peakTrackedMemBytes": 250,
                  "inputStage": {
                    "stage": "project",
                    "planNodeId": 3,
                    "nReturned": 200000,
                    "executionTimeMillisEstimate": 69,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 4,
                    "restoreState": 4,
                    "isEOF": 1,
                    "projections": {
                      "6": "(substrCP(\n    if (typeMatch(s3, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s3) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s3) \n, 0, 1) ?: null) "
                    },
                    "inputStage": {
                      "stage": "scan",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 58,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 4,
                      "restoreState": 4,
                      "isEOF": 1,
                      "numReads": 200000,
                      "recordSlot": 1,
                      "recordIdSlot": 2,
                      "scanFieldNames": [
                        "Username"
                      ],
                      "scanFieldSlots": [
                        3
                      ]
                    }
                  }
                }
              }
            },
            "peakTrackedMemBytes": 250,
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$group": {
                    "_id": {
                      "$substrCP": [
                        "$Username",
                        0,
                        1
                      ]
                    },
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "cursor": {}
            },
            "ok": 1.0
          }
        },
        {
          "name": "GroupBy.optimized",
          "command": {
            "aggregate": "events",
            "pipeline": [
              {
                "$group": {
                  "_id": {
                    "$substrCP": [
                      "$Username",
                      0,
                      1
                    ]
                  },
                  "n": {
                    "$sum": 1
                  }
                }
              }
            ],
            "hint": "Username_1",
            "readConcern": {
              "level": "snapshot"
            },
            "cursor": {}
          },
          "plan": {
            "explainVersion": "2",
            "queryPlanner": {
              "parsedQuery": {},
              "indexFilterSet": false,
              "optimizationTimeMillis": 0,
              "optimizedPipeline": true,
              "maxIndexedOrSolutionsReached": false,
              "maxIndexedAndSolutionsReached": false,
              "maxScansToExplodeReached": false,
              "prunedSimilarIndexes": false,
              "winningPlan": {
                "isCached": false,
                "queryPlan": {
                  "stage": "GROUP",
                  "planNodeId": 3,
                  "inputStage": {
                    "stage": "PROJECTION_COVERED",
                    "planNodeId": 2,
                    "transformBy": {
                      "Username": true,
                      "_id": false
                    },
                    "inputStage": {
                      "stage": "IXSCAN",
                      "planNodeId": 1,
                      "keyPattern": {
                        "Username": 1
                      },
                      "indexName": "Username_1",
                      "isMultiKey": false,
                      "multiKeyPaths": {
                        "Username": []
                      },
                      "isUnique": false,
                      "isSparse": false,
                      "isPartial": false,
                      "indexVersion": 2,
                      "direction": "forward",
                      "indexBounds": {
                        "Username": [
                          "[MinKey, MaxKey]"
                        ]
                      }
                    }
                  }
                },
                "slotBasedPlan": {
                  "slots": "$$RESULT=s6 env: {  }",
                  "stages": "[3] project [s6 = newBsonObj(\"_id\", s5, \"n\", s3)] \n[3] group [s5] [s3 = _internalCount::accumulate(s3, 1)] spillSlots[s4] mergingExprs[_internalCount::merge(s4)] \n[3] project [s5 = (substrCP(\n    if (typeMatch(s2, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s2) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s2) \n, 0, 1) ?: null)] \n[1] ixseek seekKeyLow = KS(0A01) seekKeyHigh = KS(F0FE) [s1 = recordId] [s2 = 0] @\"a39b9920-0483-4352-acd2-4bc20e41c4db\" @\"Username_1\" forward "
                }
              },
              "rejectedPlans": []
            },
            "executionStats": {
              "executionSuccess": true,
              "nReturned": 5,
              "executionTimeMillis": 62,
              "totalKeysExamined": 200000,
              "totalDocsExamined": 0,
              "executionStages": {
                "stage": "project",
                "planNodeId": 3,
                "nReturned": 5,
                "executionTimeMillisEstimate": 53,
                "opens": 1,
                "closes": 1,
                "saveState": 3,
                "restoreState": 3,
                "isEOF": 1,
                "projections": {
                  "6": "newBsonObj(\"_id\", s5, \"n\", s3) "
                },
                "inputStage": {
                  "stage": "group",
                  "planNodeId": 3,
                  "nReturned": 5,
                  "executionTimeMillisEstimate": 53,
                  "opens": 1,
                  "closes": 1,
                  "saveState": 3,
                  "restoreState": 3,
                  "isEOF": 1,
                  "groupBySlots": [
                    5
                  ],
                  "expressions": {
                    "3": "_internalCount::accumulate(s3, 1) ",
                    "initExprs": {
                      "3": null,
                      "mergingExprs": {
                        "4": "_internalCount::merge(s4) "
                      }
                    }
                  },
                  "usedDisk": false,
                  "spills": 0,
                  "spilledBytes": 0,
                  "spilledRecords": 0,
                  "spilledDataStorageSize": 0,
                  "peakTrackedMemBytes": 250,
                  "inputStage": {
                    "stage": "project",
                    "planNodeId": 3,
                    "nReturned": 200000,
                    "executionTimeMillisEstimate": 39,
                    "opens": 1,
                    "closes": 1,
                    "saveState": 3,
                    "restoreState": 3,
                    "isEOF": 1,
                    "projections": {
                      "5": "(substrCP(\n    if (typeMatch(s2, 1088) ?: true) \n    then \"\" \n    elif (coerceToString(s2) ?: true) \n    then fail(5155708, \"$substrCP: string expression could not be resolved to a string\") \n    else coerceToString(s2) \n, 0, 1) ?: null) "
                    },
                    "inputStage": {
                      "stage": "ixseek",
                      "planNodeId": 1,
                      "nReturned": 200000,
                      "executionTimeMillisEstimate": 28,
                      "opens": 1,
                      "closes": 1,
                      "saveState": 3,
                      "restoreState": 3,
                      "isEOF": 1,
                      "indexName": "Username_1",
                      "keysExamined": 200000,
                      "seeks": 1,
                      "numReads": 200001,
                      "recordIdSlot": 1,
                      "outputSlots": [
                        2
                      ],
                      "indexKeysToInclude": "00000000000000000000000000000001",
                      "seekKeyLow": "KS(0A01) ",
                      "seekKeyHigh": "KS(F0FE) "
                    }
                  }
                }
              }
            },
            "peakTrackedMemBytes": 250,
            "command": {
              "aggregate": "events",
              "pipeline": [
                {
                  "$group": {
                    "_id": {
                      "$substrCP": [
                        "$Username",
                        0,
                        1
                      ]
                    },
                    "n": {
                      "$sum": 1
                    }
                  }
                }
              ],
              "hint": "Username_1",
              "cursor": {}
            },
            "ok": 1.0
          }
        }
      ]
    }
  ],
  "mediansMs": {
    "Count0.ordinary": 45.07455,
    "Count0.optimized": 22.398899999999998,
    "Count1.ordinary": 5.32325,
    "Count1.optimized": 5.3986,
    "Count2.ordinary": 84.21965,
    "Count2.optimized": 84.39150000000001,
    "Count3.ordinary": 69.1926,
    "Page0.ordinary": 1.8271,
    "Page0.optimized": 1.7163499999999998,
    "Page5000.ordinary": 34.5533,
    "Page5000.optimized": 24.571,
    "Sequential10Pages.ordinary": 31.869349999999997,
    "Sequential10Pages.optimized": 31.38175,
    "Random10Pages.ordinary": 1067.56375,
    "Random10Pages.optimized": 1060.71985,
    "Point1000.ordinary": 96.44205,
    "Point1000.optimized": 132.22915,
    "GroupBy.ordinary": 78.28495000000001,
    "GroupBy.optimized": 54.344049999999996,
    "Concurrent4x50.ordinary": 258.67035,
    "Concurrent4x50.optimized": 266.16965,
    "Write200Files": 801.58735,
    "Read200x1KB": 52.6362,
    "RandomRead200x1KB.ordinary": 50.9328,
    "RandomRead200x1KB.optimized": 50.571749999999994,
    "FileEditRange": 20.6237,
    "FileExtendGap": 161.7471,
    "FileGrow": 29.3703,
    "FileTruncate": 15.0217,
    "ComplexNativeUpdate": 207.17485,
    "IndexedTagCount.ordinary": 4.9823,
    "Count3.optimized": 69.1926,
    "IndexedTagCount.optimized": 4.9823,
    "Insert200000": 1629.7138,
    "Prepare": 8.68145,
    "Index": 735.0218500000001
  }
}
