-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When recovering a plan from cache, we have a trial run to determine if we need to replan it.
However, the trial run results are not discarded in most cases and plan just continues the execution.
This may lead to confusing "slow query" log lines like this:
{"fromPlanCache":true, "planningTimeMicros":100123, "durationMillis":100}
It looks like despite the plan being cached, we still spent a long time planning, when in reality it was just trial run taking a long time.
Possible solutions:
- If no replanning happened, exclude trial run from planning time.
- Expand planning time to have different sub-timers for different phases of the planning like {planningTime: { evaluationPhase: ###, trialPhase: ### }}.