Thanks Gopal for a very valuable insight. So in a nutshell in Hive if "external" indexes are not used for improving query response, what value they add and can we forget them for now?
Regards, Dr Mich Talebzadeh LinkedIn https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUr V8Pw Sybase ASE 15 Gold Medal Award 2008 A Winning Strategy: Running the most Critical Financial Data on ASE 15 http://login.sybase.com/files/Product_Overviews/ASE-Winning-Strategy-091908. pdf Author of the books "A Practitioner's Guide to Upgrading to Sybase ASE 15", ISBN 978-0-9563693-0-7. co-author "Sybase Transact SQL Guidelines Best Practices", ISBN 978-0-9759693-0-4 Publications due shortly: Complex Event Processing in Heterogeneous Environments, ISBN: 978-0-9563693-3-8 Oracle and Sybase, Concepts and Contrasts, ISBN: 978-0-9563693-1-4, volume one out shortly http://talebzadehmich.wordpress.com NOTE: The information in this email is proprietary and confidential. This message is for the designated recipient only, if you are not the intended recipient, you should destroy it immediately. Any information in this message shall not be understood as given or endorsed by Peridale Technology Ltd, its subsidiaries or their employees, unless expressly so stated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither Peridale Ltd, its subsidiaries nor their employees accept any responsibility. -----Original Message----- From: Gopal Vijayaraghavan [mailto:go...@hortonworks.com] On Behalf Of Gopal Vijayaraghavan Sent: 05 January 2016 21:49 To: user@hive.apache.org Subject: Re: Is Hive Index officially not recommended? > 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