NoSQL/Hive

hive table 통계 정보 수집

세모데 2017. 2. 19. 15:36

hive.stats.autogather



analyze table test1 compute statistics;


analyze table test1 compute statistics for columns;



hive.cbo.enable=true

hive.compute.query.using.stats = true

hive.stats.fetch.column.stats=true

hive.stats.fetch.partition.stats = true



파티션 전체에 대해서 통계 정보 수집

analyze table test1 partition(pt_dt) compute statistics;


통계 수집 정보 확인

describe formatted test1 partition(pt_dt='20170110');



top k statistics 정보 수집


set hive.stats.topk.collect=true

set hive.stats.topk.num=4

set hive.stats.topk.minpercent=0

set hive.stats.topk.poolsize=100