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
For the query below, we can do som optimizations if:
parent's aggs can be roll-up and rollup from union's aggs;
parent's gb-keys comes from union's gb-keys.
before
select col1, sum(col3) from -- parent
(
select col1, col2, sum(col3) as col3 from t1 group by col1, col2 -- child
union all
select col1, col2, sum(col3) as col3 from t1 group by col1, col2
) t
group by col1;
after:
select col1, sum(col3) from
(
select col1, sum(col3) as col3 from t1 group by col1
union all
select col1, sum(col3) as col3 from t1 group by col1
) t
group by col1;
This can prune no-used columns to speed up query performance.
The text was updated successfully, but these errors were encountered:
Enhancement
For the query below, we can do som optimizations if:
before
after:
This can prune no-used columns to speed up query performance.
The text was updated successfully, but these errors were encountered: