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

Capture metrics about time spent multiplanning in slow query logs

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.2.0
    • Component/s: Diagnostics
    • None
    • Query Optimization
    • QO 2024-07-08, QO 2024-07-22

      This request is for an addition to the slow query message. SERVER-63642 implemented a serverStatus metric for this. Currently, the time spent planning a query is unaccounted in both the slow log line and in serverStats. Note that SERVER-68029 tracks very related work for the cost-based optimizer.

      Having a metric in server status reflecting the time spent planning queries would give a strong signal if there is something wrong. Perhaps a metric like "timeAcquiringMicros" for the locking statistics would be helpful to determine how efficient planning is.

      Reporting the time spent planning a query in the slow query message would greatly assist query diagnostics. Currently a query taking excessive time planning will not reflect in any of the current metrics, hiding any potential impact from planning delays.

            Assignee:
            adrian.davila@mongodb.com Adrian Davila (Inactive)
            Reporter:
            kevin.arhelger@mongodb.com Kevin Arhelger
            Votes:
            2 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved: