You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
150887: sql/opt: improve HoistJoinProjectLeft to hoist more projections r=DrewKimball a=michae2
**sql/opt: improve HoistJoinProjectLeft to hoist more projections**
Extend normalization rule `HoistJoinProjectLeft` to hoist projections
above joins in more cases. Before this, `HoistJoinProjectLeft` would
only hoist projections that were simple column remappings. This change
allows hoisting of more projections as long as (a) they are not
volatile, (b) they are not referenced by the join filters, and (c) they
do not reference input columns. (a) and (b) match the exploration rule
`HoistProjectFromInnerJoin`. (c) is a conservative heuristic to avoid
hoisting projections when doing so would prevent column
pruning. Furthermore, (d) the projections must not be referenced by the
right input, which was a pre-existing condition.
Fixes: #150704
Release note (sql change): Improve the optimizer to hoist projections
above joins in more cases, which can lead to better query plans. This
can be enabled by the new session variable
`optimizer_use_improved_hoist_join_project`.
----
**sql: enable optimizer_use_improved_hoist_join_project by default**
Informs: #150704
Release note: None
Co-authored-by: Michael Erickson <[email protected]>
│ │ render fk_lookup_crdb_region: CASE WHEN crdb_region IS NOT DISTINCT FROM CAST(NULL AS public.crdb_internal_region) THEN crdb_region ELSE crdb_region END
0 commit comments