Automatic usage of indexes is still under development (HIVE-1644). JVS
On Apr 15, 2011, at 1:31 AM, Erix Yao wrote: > hi, > I installed the hive-0.7 release for the index feature. > Here's my test table schema: > > create table testforindex (id bigint, type int) row format delimited fields > terminated by ',' lines terminated by '\n';; > create index type_idx on table testforindex (type) AS > 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED > REBUILD; > > I loaded 100000 data for index test: > hive> select count(*) from testforindex; > OK > 100000 > Time taken: 22.247 seconds > > Here's the test select for index: > hive> select count(*) from testforindex where type=1; > OK > 1000 > Time taken: 20.279 seconds > > But in the jobtracker I see : > Counter Map Reduce Total > Map input records 100,000 0 100,000 > > The hive still use the full table scan for the result. > > Is there anybody that can tell me what's wrong in my test? > -- > haitao.yao@Beijing > > > >