Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45AB510EF3 for ; Fri, 25 Jul 2014 21:16:39 +0000 (UTC) Received: (qmail 38113 invoked by uid 500); 25 Jul 2014 21:16:38 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 38038 invoked by uid 500); 25 Jul 2014 21:16:38 -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 38025 invoked by uid 500); 25 Jul 2014 21:16:38 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 37999 invoked by uid 99); 25 Jul 2014 21:16:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 21:16:38 +0000 Date: Fri, 25 Jul 2014 21:16:38 +0000 (UTC) From: "Damien Carol (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-7506) MetadataUpdater: provide a mechanism to edit the statistics of a column in a table (or a partition of a table) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074928#comment-14074928 ] Damien Carol commented on HIVE-7506: ------------------------------------ If the metastore use an RDBMS for backend, you can hack statistics in this. Anyway, the command ANALYZE answer your (2). > MetadataUpdater: provide a mechanism to edit the statistics of a column in a table (or a partition of a table) > -------------------------------------------------------------------------------------------------------------- > > Key: HIVE-7506 > URL: https://issues.apache.org/jira/browse/HIVE-7506 > Project: Hive > Issue Type: New Feature > Components: Database/Schema > Reporter: pengcheng xiong > Assignee: pengcheng xiong > Priority: Critical > Original Estimate: 252h > Remaining Estimate: 252h > > Two motivations: > (1) CBO depends heavily on the statistics of a column in a table (or a partition of a table). If we would like to test whether CBO chooses the best plan under different statistics, it would be time consuming if we load the whole table and create the statistics from ground up. > (2) As database runs, the statistics of a column in a table (or a partition of a table) may change. We need a way or a mechanism to synchronize. > We propose the following command to achieve that: > ALTER TABLE table_name PARTITION partition_spec [COLUMN col_name] UPDATE STATISTICS col_statistics [COMMENT col_comment] -- This message was sent by Atlassian JIRA (v6.2#6252)