[
https://issues.apache.org/jira/browse/IMPALA-5260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Csaba Ringhofer updated IMPALA-5260:
------------------------------------
Labels: performance planner (was: perfomance planner)
> Have query optimizer make joined tables distinct to improve performance
> -----------------------------------------------------------------------
>
> Key: IMPALA-5260
> URL: https://issues.apache.org/jira/browse/IMPALA-5260
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.6.0, Impala 2.7.0, Impala 2.8.0
> Reporter: Michael Sokalski
> Priority: Minor
> Labels: performance, planner
>
> Consider the following select statement:
> {code:sql}
> select tB.bField, count(tA.aField) ct
> from tableA tA
> join tableB tB using (id)
> where (...)
> group by tB.bField
> order by ct
> {code}
> if tableB has a large number of rows (but still less than tableA),
> performance can be orders of magnitude slower than the equivalent query:
> {code:sql}
> select tB.bField, count(tA.aField) ct
> from tableA tA
> join (select distinct bField, id[, ...] from tableB) tB using (id)
> where (...)
> group by tB.bField
> order by ct
> {code}
> It appears to me that the slower query gets bogged down with shuttling
> unnecessary data between nodes.
> Is it possible, and beneficial, to make such a query improvement implicit in
> Impala's query optimizer?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]