Etl之HiveSql调优(union all)

相信在Etl的过程当中不可避免的实用union all来拼装数据,那么这就涉及到是否并行处理的问题了。html

在hive中是否适用并行map,能够经过参数来设定:spa

set hive.exec.parallel=true; 

那么仍是实用上一篇博客的数据,连接:http://www.cnblogs.com/liqiu/p/4873238.htmlcode

若是我们须要一些数据:htm

select * from (select sight_id from order_sight where create_time="2015-10-10" and sight_id = 9718 union all select id as sight_id from sight where id = 9718) a;

就是模拟分别从两个表里面获取数据,若是不开启并行,实用的时间是开启时间的两倍,因此这个地方多加注意!blog

相关文章
相关标签/搜索