小编zha*_*ang的帖子

如何将三个或更多表的分布式联接作为本地联接?

我主要对三个表的执行计划感到困惑,这是查询的执行计划如下(注:t1d,t2d,t3d是分布式表):

\n
select xxx\nfrom t1d t1d\nleft join \n    (select * from t2d where xxx group by xxx) t2d \nusing A\nleft join\n    (select * from t3d where xxx group by xxx) t3d\nusing A\nwhere t1d.xxx\ngroup by t1d.xxx\nSETTINGS distributed_product_mode=\'local\'\n
Run Code Online (Sandbox Code Playgroud)\n
\xe2\x94\x8c\xe2\x94\x80explain\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x90\n\xe2\x94\x82 Expression (Projection)                                                                           \xe2\x94\x82\n\xe2\x94\x82   CreatingSets (Create sets before main query execution)                                          \xe2\x94\x82\n\xe2\x94\x82     Expression (Before ORDER BY)                                                                  \xe2\x94\x82\n\xe2\x94\x82       Join (JOIN)                                                                                 \xe2\x94\x82\n\xe2\x94\x82         Expression ((Before JOIN + Projection))                                                   \xe2\x94\x82\n\xe2\x94\x82           SettingQuotaAndLimits (Set limits and quota after reading from storage)                 \xe2\x94\x82\n\xe2\x94\x82             Union                                                                                 \xe2\x94\x82\n\xe2\x94\x82               Expression ((Convert block structure for …
Run Code Online (Sandbox Code Playgroud)

clickhouse

2
推荐指数
1
解决办法
5603
查看次数

标签 统计

clickhouse ×1