hive查询的性能改进

时间:2017-03-28 13:26:34

标签: hadoop hive bigdata

我正在使用多个union all然后执行每列的总和,但此查询会像永远一样运行。我有96GB内存集群。请告诉我应该怎样做才能提高性能。以下是我在hive中的查询。

total as
(
select * from
(
   select * from table1
   union all
   select * from table2
   union all
   select * from table3
   union all
   select * from table4
   union all
   select * from table5
   union all
   select * from table6
   union all
   select * from table7
   union all
   select * from table8
   union all
   select * from table9
)p
)


Select * from
(
select
sum(col_1),
sum(col_2),
sum(col_3),
sum(col_4),
sum(col_5),
sum(col_6),
sum(col_7),
sum(col_8),
sum(col_9),
sum(col_10)
from total
)q;

0 个答案:

没有答案