优化查询以及检索性能
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;
原文:https://www.cnblogs.com/yszd/p/11040800.html