Forgot to add to the previous email, HIVE-1644 added support to have filters use indexes.
Thanks, Shreepadma On Tue, Oct 23, 2012 at 11:48 AM, Shreepadma Venugopalan < shreepa...@cloudera.com> wrote: > Hi Peter, > > Indexing support was added to Hive in 0.7 and in 0.8 the query compiler > was enhanced to optimized some class of queries (certain group bys and > joins) using indexes. Assuming you are using the built in index handler you > need to do the following _after_ you have created and rebuilt the index, > > SET hive.index.compact.file='/tmp/index_result'; > SET > hive.input.format=org.apache.hadoop.hive.ql.index.compact.HiveCompactIndexInputFormat; > > You will then notice speed up for a query of the form, > > select count(*) from tab where indexed_col = some_val > > Thanks, > Shreepadma > > On Tue, Oct 23, 2012 at 5:44 AM, Peter Marron < > peter.mar...@trilliumsoftware.com> wrote: > >> Hi,**** >> >> ** ** >> >> I’m very much a Hive newbie but I’ve been looking at HIVE-417 and this >> page in particular:**** >> >> http://cwiki.apache.org/confluence/display/Hive/IndexDev**** >> >> Using this information I’ve been able to create an index (using Hive >> 0.8.1)**** >> >> and when I look at the contents it all looks very promising indeed.**** >> >> However on the same page there’s this comment:**** >> >> ** ** >> >> “…This document currently only covers index creation and maintenance. A >> follow-on will explain how indexes are used to optimize queries (building >> on >> FilterPushdownDev<https://cwiki.apache.org/confluence/display/Hive/FilterPushdownDev> >> )….”**** >> >> ** ** >> >> However I can’t find the “follow-on” which tells me how to exploit the >> index that I’ve**** >> >> created to “optimize” subsequent queries.**** >> >> Now I’ve been told that I can create and use indexes with the current**** >> >> release of Hive _*without*_ writing and developing any Java code of my >> own.**** >> >> Is this true? If so, how?**** >> >> ** ** >> >> Any help appreciated.**** >> >> ** ** >> >> Peter Marron.**** >> > >