-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
union all of many literals very slow (separate stage) for each #13896
Comments
similar to #3876 and trinodb/trino#14 |
The optimizer should be able to rewrite this to a single values node. meaning the current plan
should be the same as
I'm thinking two optimizer rules together should solve the issue
|
@ankitdixit is planning to work on this. |
Hi @ankitdixit , @rschlussel - is this enhancement merged on master branch ? if so; which release version reflects this change |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with lkp as (select 'de' c , 'germany' d union all select 'it' c, 'italy' d union all select 'ca' c, 'canada' d) select * from lkp
if i include +200 selects in that with block to get all countries the query is very slow. looks like a new stage/task gets run for each row! i think this could be optimised to combine into single stage since they are all literals
The text was updated successfully, but these errors were encountered: