Skip to content
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

local table join and insert for distributed table #39820

Open
aflyflyv2 opened this issue Aug 2, 2022 · 2 comments
Open

local table join and insert for distributed table #39820

aflyflyv2 opened this issue Aug 2, 2022 · 2 comments

Comments

@aflyflyv2
Copy link

Make sure to check documentation https://clickhouse.com/docs/en/ first. If the question is concise and probably has a short answer, asking it in Telegram chat https://telegram.me/clickhouse_en is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse

If you still prefer GitHub issues, remove all this text and ask your question here.

@aflyflyv2 aflyflyv2 added the question Question? label Aug 2, 2022
@aflyflyv2
Copy link
Author

The same requirement as this post: https://stackoverflow.com/questions/72270323/how-can-clickhouse-local-join-and-local-insert-on-distributed-tables

I have several tables with the same shard key(id), and want to perform table join(prefer local table join) and insert into local table on the same shard, so that all the join can be done within the same shard.

can it be done as below?

insert into t_user_flat_local             -- use local
select * 
from t_user_info_all               t1      -- use   all
left join t_user_event_local    t2      -- use   local
on t1.user_id = t2.user_id

@den-crane den-crane added feature and removed question Question? labels Aug 2, 2022
@den-crane
Copy link
Contributor

It's impossible currently

@vdimir vdimir added the comp-joins JOINs label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants