[ 
https://issues.apache.org/jira/browse/IMPALA-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Armstrong resolved IMPALA-1270.
-----------------------------------
    Fix Version/s: Impala 4.0
       Resolution: Fixed

> Consider adding distinct aggregation to subqueries as perf optimization
> -----------------------------------------------------------------------
>
>                 Key: IMPALA-1270
>                 URL: https://issues.apache.org/jira/browse/IMPALA-1270
>             Project: IMPALA
>          Issue Type: Task
>          Components: Frontend
>    Affects Versions: Impala 2.0
>            Reporter: Nong Li
>            Assignee: Tim Armstrong
>            Priority: Minor
>              Labels: planner
>             Fix For: Impala 4.0
>
>
> We should consider other rewrites for exists. For q4, another rewrite is an 
> inner join + distinct:
> {code}
> select
>   o_orderpriority,
>   count(distinct l_orderkey) as order_count
> from lineitem l
> inner join orders o
>   on (o.o_orderkey = l.l_orderkey and
>       l.l_commitdate < l.l_receiptdate)
> where
>   o_orderdate >= '1993-07-01' and
>   o_orderdate < '1993-10-01'
> group by
>   o_orderpriority
> order by
>   o_orderpriority
> {code}
> This can run much faster because we have more flexibility on how we execute 
> the inner join. We get killed partitioning lineitem now.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to