Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-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 2E88118608 for ; Sat, 6 Feb 2016 00:05:45 +0000 (UTC) Received: (qmail 36678 invoked by uid 500); 6 Feb 2016 00:05:40 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 36579 invoked by uid 500); 6 Feb 2016 00:05:40 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 36554 invoked by uid 99); 6 Feb 2016 00:05:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Feb 2016 00:05:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D3BBC2C1F58 for ; Sat, 6 Feb 2016 00:05:39 +0000 (UTC) Date: Sat, 6 Feb 2016 00:05:39 +0000 (UTC) From: "Jinfeng Ni (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-4363) Apply row count based pruning for parquet table in LIMIT n query MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jinfeng Ni created DRILL-4363: --------------------------------- Summary: Apply row count based pruning for parquet table in LIMIT n query Key: DRILL-4363 URL: https://issues.apache.org/jira/browse/DRILL-4363 Project: Apache Drill Issue Type: Improvement Reporter: Jinfeng Ni In interactive data exploration use case, one common and probably first query that users would use is " SELECT * from table LIMIT n", where n is a small number. Such query will give user idea about the columns in the table. Normally, user would expect such query should be completed in very short time, since it's just asking for small amount of rows, without any sort/aggregation. When table is small, there is no big problem for Drill. However, when the table is extremely large, Drill's response time is not as fast as what user would expect. In case of parquet table, it seems that query planner could do a bit better job : by applying row count based pruning for such LIMIT n query. The pruning is kind of similar to what partition pruning will do, except that it uses row count, in stead of partition column values. Since row count is available in parquet table, it's possible to do such pruning. The benefit of doing such pruning is clear: 1) for small "n", such pruning would end up with a few parquet files, in stead of thousands, or millions of files to scan. 2) execution probably does not have to put scan into multiple minor fragments and start reading the files concurrently, which will cause big IO overhead. 3) the physical plan itself is much smaller, since it does not include the long list of parquet files, reduce rpc cost of sending the fragment plans to multiple drillbits, and the overhead to serialize/deserialize the fragment plans. -- This message was sent by Atlassian JIRA (v6.3.4#6332)