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 58E58D0F2 for ; Tue, 29 Jan 2013 19:13:15 +0000 (UTC) Received: (qmail 84922 invoked by uid 500); 29 Jan 2013 19:13:14 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 84865 invoked by uid 500); 29 Jan 2013 19:13:14 -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 84857 invoked by uid 500); 29 Jan 2013 19:13:14 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 84853 invoked by uid 99); 29 Jan 2013 19:13:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 19:13:14 +0000 Date: Tue, 29 Jan 2013 19:13:14 +0000 (UTC) From: "Gang Tim Liu (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-3917) Support fast operation for analyze command 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-3917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13565667#comment-13565667 ] Gang Tim Liu commented on HIVE-3917: ------------------------------------ [~shreepadma] sorry to not fully understand your initial question. [~ashutoshc] thank you very much for explaining it in more details and carrying the discussion. great! thanks. Yes, partial scan is a great choice. Actually, we have thought about it. With https://cwiki.apache.org/Hive/rcfilecat.html, we can even achieve it for RCFile. Yes, it will be faster than full scan but still slower than noscan. Consider a big data warehouse, partial scan is still magnitude slower than noscan. With potential speedup from simple MR, it will be sill slower than noscan. Saying that, we can view all 3 as great choices for different use cases: noscan, partial scan and full scan (which is default). I will create a follow up for partial scan. > Support fast operation for analyze command > ------------------------------------------ > > Key: HIVE-3917 > URL: https://issues.apache.org/jira/browse/HIVE-3917 > Project: Hive > Issue Type: Improvement > Components: Statistics > Affects Versions: 0.11.0 > Reporter: Gang Tim Liu > Assignee: Gang Tim Liu > Attachments: HIVE-3917.patch.1 > > > hive supports analyze command to gather statistics from existing tables/partition https://cwiki.apache.org/confluence/display/Hive/StatsDev#StatsDev-ExistingTables > It collects: > 1. Number of Rows > 2. Number of files > 3. Size in Bytes > If table/partition is big, the operation would take time since it will open all files and scan all data. > It would be nice to support fast operation to gather statistics which doesn't require to open all files: > 1. Number of files > 2. Size in Bytes > Potential syntax is > ANALYZE TABLE tablename [PARTITION(partcol1[=val1], partcol2[=val2], ...)] COMPUTE STATISTICS [noscan]; > In the future, all statistics without scan can be retrieved via this optional parameter. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira