How do you take advantage of Hive bucketing in a SELECT query?
-
I have a hive table bucketed on userId, My select query contains userId in where clause but hive is doing full table scan. `hive.enforce.bucketing` is true Why don't hive take advantage of bucketing in such cases, is there any config to enable it?? Table Structure userId int, name int, address String, cell int, ...... ...... ...... ...... CLUSTERED BY (userId) SORTED BY (userId) INTO 20 BUCKETS Select query select cell from <table> where userId=<userId>
-
Answer:
How are you inserting data into this table? note that to take advantage of bucketing, you need to insert data using a hive query itself. If you manually put a text file at the location, bucketing wont work on that!
Manju Garg at Quora Visit the source
Related Q & A:
- How to write a complex query with doctrine?Best solution by Stack Overflow
- How to convert a SQL query into hibernate criteria?Best solution by Stack Overflow
- How to make a MySql query faster?Best solution by Stack Overflow
- Is child crying going to a NEW school ok? how long does it take to stop crying after starting a new school?Best solution by Yahoo! Answers
- How do you take a video on a blackberry bold?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.