hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erix Yao <yao.e...@gmail.com>
Subject index is not working for me.
Date Fri, 15 Apr 2011 08:31:22 GMT
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 :
CounterMapReduceTotal
Map input records100,0000100,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

Mime
View raw message