Re: Problem with query on bucketed table

2011-10-09 Thread Bejoy Ks
Hi Avrilia If you are having 20M partitions then your data volume should be really huge as well. When doing partitions ensure that you have sufficiently enough volume of data in each partition. Based on your data and expected frequent queries choose a column for partitioning that ensure

Re: Problem with query on bucketed table

2011-10-09 Thread Avrilia Floratou
Hi Bejoy, Thanks for your help. You are right. Partitions would help. The thing is that the P_PARTKEY has 2 values in my table. And I expect the table to get bigger. I tried to issue the dynamic partition insert query with many configurations but it fails every time. I followed the instru

Re: Problem with query on bucketed table

2011-10-09 Thread Bejoy Ks
Hi Avrilia,    In your SELECT query you need to append the following, *** TABLESAMPLE( BUCKET x OUT OF y);  It specifies from which all buckets to scan and to get the data from. Only in the case of partitions if you issue a select query (on a partition) without any hint only that partiti

Problem with query on bucketed table

2011-10-09 Thread Avrilia Floratou
Hello, I have a question regarding the execution of some queries on bucketed tables. I've created a compressed bucketed table using the following statement: create external table partRC (P_PARTKEY BIGINT,P_NAME STRING, P_MFGR STRING, P_BRAND STRING, P_TYPE STRING, P_SIZE INT, P_CONTAINER STRING,