Etl之HiveSql调优(union all)

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

在hive中是否适用并行map,可以通过参数来设定:

set hive.exec.parallel=true; 

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

如果咱们需要一些数据:

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;

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

posted @ 2015-10-12 23:55  李秋  阅读(2562)  评论(0编辑  收藏  举报