hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mich Talebzadeh <mich.talebza...@gmail.com>
Subject Re: alter partitions on hive external table
Date Mon, 06 Jun 2016 07:32:35 GMT
so you are doing this for partition elimination?

it is a tough call whatever you do

Since userid is unique you can try

CLUSTERED BY (userid,datetime,customerid) INTO 256 BUCKETS

or try creating a new table based on new column partition and insert/select
part of data and see it actually improves performance.

I much doubt whichever way you go it is really going to have that impact on
your performance.

Dr Mich Talebzadeh



LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com



On 6 June 2016 at 08:18, raj hive <raj.hiveql@gmail.com> wrote:

> Hi Mich,
>
> table type is external table. Yes, I am doing this for certain queries
> where userid as the most significant column.
>
> On Mon, Jun 6, 2016 at 12:35 PM, Mich Talebzadeh <
> mich.talebzadeh@gmail.com> wrote:
>
>> That order datetime/userid/customerId looks more natural to me.
>>
>> Two questions:
>>
>> What is the type of table in Hive?
>>
>> Are you doing this for certain queries where you think userid as the most
>> significant column is going to help queries better?
>>
>> HTH
>>
>>
>>
>> Dr Mich Talebzadeh
>>
>>
>>
>> LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>> <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>>
>>
>>
>> http://talebzadehmich.wordpress.com
>>
>>
>>
>> On 6 June 2016 at 04:02, raj hive <raj.hiveql@gmail.com> wrote:
>>
>>> Hi friends,
>>>
>>> I have created partitions on hive external tables. partitions on
>>> datetime/userid/customerId.
>>>
>>> now i have to change the order of the partitions for the existing data
>>> for all the dates.
>>>
>>> order of the partition is custerid/userid/datetime.
>>>
>>> Anyone can help me, how to alter the partitions for the existing table.
>>> Need a help to write a script to change the partions on existing data.
>>> almost 3 months data is there to modify as per new partition so changing
>>> each date is difficult. Any expert can help me.
>>>
>>> Thanks
>>> Raj
>>>
>>
>>
>

Mime
View raw message