hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trang van anh <anh...@vtc.vn>
Subject Hive index
Date Fri, 14 Oct 2011 03:26:48 GMT
Dear all,

I am using HIVE 0.7.1 version that supports indexing table, let example

i have hive table with following structure:

1. create table pv_user (pageid int, stirng age);
2. create index table:
      create index pv_user_index on table pv_user(pageid) as 'compact' 
with deffered build stored as RCFILE
3. i queries original table

+) select pageid, count(1) from pv_user group by pageid.

rewrite query on index table:
+) select pageid, size(`_offsets`) from 
`default__pv_user_pv_user_index__ 
<http://search-slave-157:50075/browseDirectory.jsp?dir=%2Fuser%2Fhive%2Fwarehouse%2Fdefault__pv_user_test_pv_user_test_index__&namenodeInfoPort=50070>`

i have question, current hive version have rewriting module to 
automatically convert original query to rewrite query yet? i means i  
type query "select pageid , count(1) from pv_user group by pageid" but 
it takes advantage indexed table.

Thanks for your support.







Mime
View raw message