Hive查询在使用unix_timestamp('2015-07-06','yyyy-MM-dd')* 1000函数时扫描所有分区,如何解决这个问题?

时间:2015-10-27 06:33:10

标签: sql hive

我在dt上划分了我的表格,这是一个纪元时间戳,例如1435689000000 ,14356.89亿 ,1435775400000 当我使用

查询我的表格时
SELECT 
  report_time,
  msisdn AS msisdn,
  city AS city,
  device_type AS device_type,
  dt AS dt,
  avg(cei_index) as cei_score_reference,  
  avg(data_cei_index) as data_kqi_reference,  
FROM index_1_day
Where dt = unix_timestamp('2015-07-07','yyyy-MM-dd')*1000  
   group by 
  report_time,
  msisdn, 
  city,
  dt,
  device_type;

查询正在扫描表中可用的所有分区。

我已使用EXPLAIN DEPENDENCY进行检查。

需要有关此问题的帮助,我只能使用unix_timestamp('2015-07-07','yyyy-MM-dd')* 1000功能。

0 个答案:

没有答案