`
乡里伢崽
  • 浏览: 108642 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

explain hive index

    博客分类:
  • hive
 
阅读更多
设置索引:
使用聚合索引优化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';
[java] 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 
可以发现会执行索引。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics