Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6EFCE200B56 for ; Sat, 16 Jul 2016 02:09:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6D813160A89; Sat, 16 Jul 2016 00:09:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AC590160A61 for ; Sat, 16 Jul 2016 02:09:21 +0200 (CEST) Received: (qmail 70849 invoked by uid 500); 16 Jul 2016 00:09:20 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 70819 invoked by uid 99); 16 Jul 2016 00:09:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jul 2016 00:09:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 74A792C0032 for ; Sat, 16 Jul 2016 00:09:20 +0000 (UTC) Date: Sat, 16 Jul 2016 00:09:20 +0000 (UTC) From: "Gopal V (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-14256) CBO: Rewrite aggregate + distinct as 3-stage DAG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 16 Jul 2016 00:09:22 -0000 Gopal V created HIVE-14256: ------------------------------ Summary: 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} -- This message was sent by Atlassian JIRA (v6.3.4#6332)