-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, we have join eligibility checks to see if any of the fields in the join predicates are multikey and bail out of join if they any are multikey. Thus, even if we cache a plan whose join field later becomes multikey we are currently protected because the join eligibility checks will fail before we even try to retrieve the plan from cache.
However, the non-join fields of a join query, e.g. STPs, may have fields that become multikey that the join plan cache will not be able to detect. We should encode the multikeyness of every single field in the join query into the join plan cache key so that in the event that multikeyness changes on any of the fields, we get a cache miss and do the replanning.
This important because downstream components such as index bounds builders and IXSCAN stage deduplication operates differently based on the multikey state of a field.