ITeye博客

explain hive index

乡里伢崽 · 2014-08-24 16:44 · hive · 编程语言 · Markdown

设置索引: 使用聚合索引优化groupby操作 hive> set hive.optimize.index.groupby=false;

自动使用索引 hive> set hive.optimize.index.filter=true;

设置自动使用索引的最小输入字节数 hive>set hive.optimize.index.filter.compact.minsize=64

注意 hive.optimize.index.groupby必须设置生false,不然 hive.optimize.index.filter不起作用。

hive> explain select count(1) from ctest where dp_id='10275499'; view plaincopy STAGE PLANS:
Stage: Stage-3
Map Reduce
Alias -> Map Operator Tree:
taobao_db__aatest_aatestindex__
TableScan
alias: taobao_db__aatest_aatestindex__
filterExpr:
expr: (tid = '57301233')
type: boolean
Filter Operator
可以发现会执行索引。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。