-
Type: Improvement
-
Resolution: Duplicate
-
Priority: 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.
- duplicates
-
SERVER-82764 Make "planningTimeMicros" incorporate time from the multi-planner trial period
- Closed
- is related to
-
SERVER-61250 Introduce bound inclusions for bounded collection scans
- Closed
- related to
-
SERVER-68029 Add new metric to measure optimization time for Bonsai
- Open
-
SERVER-63642 Add serverStatus metrics to measure multi-planning performance
- Closed