> I am going to run the same query in Hive. However, I only see a table >scan below and no mention of that index. May be I am missing something >here?
Hive Indexes are an incomplete feature, because they are not maintained over an ACID storage & demand FileSystem access to check for validity. I'm almost sure there's a better implementation, which never made it to Apache (read HIVE-417 & comments about HBase). So far, in all my prod cases, they've slowed down queries more often than speeding them up. By default, the indexes are *not* used to answer queries. In fact, the slowness was mostly attributed to the time spent making sure the index was invalid. You can flip those on if you want mostly up-to date results. set hive.optimize.index.filter=true; set hive.optimize.index.groupby=true; set hive.index.compact.query.max.size=-1; set hive.optimize.index.filter.compact.minsize=-1; set hive.index.compact.query.max.entries=-1; Things are going to change in Hive-2.0 though. The addition of isolated transactions brings new light into the world of indexes. I'll be chasing that down after LLAP, since the txn model offers serializability markers and the LockManager + compactions offer a great way to purge/update them per-partition. And the metastore-2.0 removes a large number of scalability problems associated with metadata. Cheers, Gopal