首页 > 其他 > 详细

Hive索引

时间:2019-06-17 18:21:00      阅读:130      评论:0      收藏:0      [点我收藏+]

一.目的

  优化查询以及检索性能

二.创建索引

  create index index_user on table user(name)

  as ‘org.apache.hadoop.hive.ql.index.compact.CompactIndexHandle‘ wiith deferred rebuild

  in table index_user_table;

  备注:

  as:指定索引器;

  in table:指定索引表,若不指定默认生成在default_user_t1_index_表中;

三.查询索引

  show index on user;

四.重建索引

  alter index index_user on user rebuild;

  注意:创建索引之后必须重建索引才能生效!

五.删除索引

  drop index if exists index_user on user;

Hive索引

原文:https://www.cnblogs.com/yszd/p/11040800.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!