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: Optimized Hive query
Date Mon, 13 Jun 2016 22:16:52 GMT
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