Dhiraj
Dhiraj

Reputation: 3696

Can we create index on external table in Hive?

Is it possible to create index on external table in HIVE? It could be any index, Compact or Bitmap. In some place I read that it is not possible to create index on external table but somewhere else I also read that it doesn't matter. So I want to know for sure.

Upvotes: 0

Views: 6017

Answers (2)

Kiran Krishna Innamuri
Kiran Krishna Innamuri

Reputation: 1002

You can perform indexing on both the tables. Internal or External table does not make a difference as far as performance is considered. You can build indexes on both. Either ways building indexes on large data sets is counter intuitive.

Here are few scenarios when indexing is not preferred

  • Indexes are advised to build on the columns on which you frequently perform operations.

  • Building more number of indexes also degrade the performance of your query.

  • Type of index to be created should be identified prior to its creation (if your data requires bitmap you should not create compact). This leads to increase in time for executing your query.

You can refer to the below link for more details on how to perform indexing in Hive

https://acadgild.com/blog/indexing-in-hive/

Upvotes: 0

Ronak Patel
Ronak Patel

Reputation: 3849

Hive indexing was added in version 0.7.0, and bitmap indexing was added in version 0.8.0.

Create/Drop/Alter Index

more details

Upvotes: 1

Related Questions