hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gopal V (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-14256) CBO: Rewrite aggregate + distinct as 3-stage DAG
Date Sat, 16 Jul 2016 00:19:20 GMT

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

Gopal V updated HIVE-14256:
---------------------------
    Description: 
{code}
select sum(ss_net_profit), count(distinct ss_customer_sk) from store_sales;
{code}

is very slow, while manually sub-aggregating this makes it much faster.

{code}
select sum(v), count(c) from 
( select sum(ss_net_profit) as v, ss_customer_sk as k from store_sales group by ss_customer_sk);
{code}

Query28 in TPC-DS would be an example of whether this would be valuable.

  was:
{code}
select sum(ss_net_profit), count(distinct ss_customer_sk) from store_sales;
{code}

is very slow, while manually sub-aggregating this makes it much faster.

{code}
select sum(v), count(c) from 
( select sum(ss_net_profit) as v, ss_customer_sk as k from store_sales group by ss_customer_sk);
{code}


> CBO: Rewrite aggregate + distinct as 3-stage DAG
> ------------------------------------------------
>
>                 Key: HIVE-14256
>                 URL: https://issues.apache.org/jira/browse/HIVE-14256
>             Project: Hive
>          Issue Type: Improvement
>          Components: CBO
>    Affects Versions: 2.2.0
>            Reporter: Gopal V
>
> {code}
> select sum(ss_net_profit), count(distinct ss_customer_sk) from store_sales;
> {code}
> is very slow, while manually sub-aggregating this makes it much faster.
> {code}
> select sum(v), count(c) from 
> ( select sum(ss_net_profit) as v, ss_customer_sk as k from store_sales group by ss_customer_sk);
> {code}
> Query28 in TPC-DS would be an example of whether this would be valuable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message