このブログを検索

2016/05/20

How to fast count of hive table

ANALYZE TABLE {table-name} COMPUTE STATISTICS;
or
ANALYZE TABLE {table-name} COMPUTE STATISTICS NOSCAN;
or
ANALYZE TABLE {table-name} partition(dt='20151005') COMPUTE STATISTICS NOSCAN;


DESCRIBE EXTENDED {table-name} partition(dt='20151001');

We can find "rawDataSize=1303119"