hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aviral Agarwal <aviral12...@gmail.com>
Subject Re: Optimized Hive query
Date Tue, 14 Jun 2016 06:00:58 GMT
Yes I want to flatten the query.
Also the Insert code is correct.

Thanks,
Aviral Agarwal


On Tue, Jun 14, 2016 at 3:46 AM, Mich Talebzadeh <mich.talebzadeh@gmail.com>
wrote:

> you want to flatten the query I understand.
>
> create temporary table tmp as select c from d;
>
> INSERT INTO TABLE a
> SELECT c from tmp where
> condition
>
> Is the INSERT code correct?
>
> 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 13 June 2016 at 17:55, Aviral Agarwal <aviral12028@gmail.com> wrote:
>
>> Hi,
>> I would like to know if there is a way to convert nested hive sub-queries
>> into optimized queries.
>>
>> For example :
>> INSERT INTO TABLE a.b SELECT * FROM ( SELECT c FROM d)
>>
>> into
>>
>> INSERT INTO TABLE a.b SELECT c FROM D
>>
>> This is a simple example but the solution should apply is there were
>> deeper nesting levels present.
>>
>> Thanks,
>> Aviral Agarwal
>>
>>
>

Mime
View raw message