impala的优化策略:广播,hash与straight_join

本文介绍了Impala查询优化中的广播连接和分区连接策略,以及在统计信息不足或自动优化不理想时,如何使用STRAIGHT_JOIN关键字固定连接顺序。STRAIGHT_JOIN不仅适用于INNER JOIN,也适用于LEFT JOIN。
摘要由CSDN通过智能技术生成

查看执行计划,避免大表被广播,表关联顺序如果被impala优化器修改导致hint失效,使用straight_join固定顺序。
阅读impala官方文档

关于hint

The Impala query planner chooses between different techniques for performing join queries, depending on the absolute and relative sizes of the tables. Broadcast joins are the default, where the right-hand table is considered to be smaller than the left-hand table, and its contents are sent to all the other nodes involved in the query. The alternative technique is known as a partitioned join (not related to a partitioned table), which is more suitable for large tables of roughly equal size. With this technique, portions of each table are sent to appropriate other nodes where those subsets of rows can be processed in parallel. The choice of broadcast or partitioned join also depends on statistics being available for all tables in the join, gathered by the COMPUTE STATS statement.
Impala查询规划器根据表的绝对大小和相对大小来选择执行连接查询的不同技术。广播连接是默认的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值