Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91954

Add 'queryShapeHash' to explain, rename 'queryHash' to 'planCacheShapeHash'

    • Query Execution
    • Minor Change
    • v8.0
    • QE 2024-08-05, QE 2024-08-19, QE 2024-09-02, QE 2024-09-16, QE 2024-09-30

      Currently the only user-available means to get ahold of the query shape hash for a given query, one can either:

      • Wait & spot the query shape hash in the slow query log.
      • Invoke setQuerySettings on the given query, and later query via the $querySettings aggregation stage to see the query shape hash.

      To improve user experience, we should make that the query shape hash is readily available in the explain output via a new queryShapeHash, if present.

      The new field queryShapeHash should be available on top-level explain output (i.e. accessible via explain.queryShapeHash), and would ideally be positioned under explain.command.

      —

      To minimise confusion going forward, We need to make sure to rename every occurrence of the plan-cache specific shape hash:

      • from: "queryHash"
      • to: "planCacheShapeHash"

      This change should be done for both code naming conventions, and especially for field names in user-facing output such as: explain, plan cache stats, currop.

      Note: This change will require downstream attention.

            Assignee:
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Reporter:
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: