ExportXMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Developer Tools

      Original Downstream Change Summary

      This ticket optimizes some $queryStats pipelines. If users run a pipeline such as:

      [
      { $queryStats: {} },
      { $match: { keyHash:

      { $in: [<keyHash1>, <keyHash2>] }

      } }
      ]

      (or filter by a single keyHash), the $match can be pushed into $queryStats. Instead of scanning the entire in-memory query stats store and filtering afterward, the stage uses a secondary index to look up the matching entries. With explain enabled, the $queryStats stage includes a keyHashLookupLocations array containing the keyHash values used for the lookup:

      "$queryStats" :

      { "keyHashLookupLocations" : [<keyHash1>, <keyHash2>] }

      The returned $queryStats documents remain unchanged. SERVER-125570

      Description of Linked Ticket

      null

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: