[ https://issues.apache.org/jira/browse/DRILL-4387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150797#comment-15150797 ]
Jinfeng Ni commented on DRILL-4387: ----------------------------------- I did a simple performance comparison on my mac, using TPCH SF10 lineitem parquet table. Both numbers are measured with warm cache. Without patch: {code} 0: jdbc:drill:zk=local> select distinct dir1 from dfs.`/drill/testdata/tpch-sf10/lineitem`; +-------+ | dir1 | +-------+ | null | +-------+ 1 row selected (18.958 seconds) {code} With patch: {code} 0: jdbc:drill:zk=local> select distinct dir1 from dfs.`/drill/testdata/tpch-sf10/lineitem`; +-------+ | dir1 | +-------+ | null | +-------+ 1 row selected (2.255 seconds) {code} Basically, the query time is reduced from 18.9 seconds to 2.2 seconds. The profile also shows the memory for the Scan operator is reduced from 54M to 2M. > Improve execution side when it handles skipAll query > ---------------------------------------------------- > > Key: DRILL-4387 > URL: https://issues.apache.org/jira/browse/DRILL-4387 > Project: Apache Drill > Issue Type: Bug > Reporter: Jinfeng Ni > Assignee: Jinfeng Ni > Fix For: 1.6.0 > > > DRILL-4279 changes the planner side and the RecordReader in the execution > side when they handles skipAll query. However, it seems there are other > places in the codebase that do not handle skipAll query efficiently. In > particular, in GroupScan or ScanBatchCreator, we will replace a NULL or empty > column list with star column. This essentially will force the execution side > (RecordReader) to fetch all the columns for data source. Such behavior will > lead to big performance overhead for the SCAN operator. > To improve Drill's performance, we should change those places as well, as a > follow-up work after DRILL-4279. > One simple example of this problem is: > {code} > SELECT DISTINCT substring(dir1, 5) from dfs.`/Path/To/ParquetTable`; > {code} > The query does not require any regular column from the parquet file. However, > ParquetRowGroupScan and ParquetScanBatchCreator will put star column as the > column list. In case table has dozens or hundreds of columns, this will make > SCAN operator much more expensive than necessary. -- This message was sent by Atlassian JIRA (v6.3.4#6332)