[
https://issues.apache.org/jira/browse/DRILL-4815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16624390#comment-16624390
]
Boaz Ben-Zvi commented on DRILL-4815:
-------------------------------------
Just tried this query on the latest code (post 1.14.0) on my Mac; first run was:
||Planning||Queued||Execution||Total||
|1.329 sec|0.000 sec|0.810 sec|2.139 sec|
second time was:
||Planning||Queued||Execution||Total||
|0.414 sec|0.001 sec|0.153 sec|0.568 sec|
and third time was:
||Planning||Queued||Execution||Total||
|0.234 sec|0.000 sec|0.124 sec|0.358 sec|
> Run-time code compilation may take dozen seconds for complex expression
> -----------------------------------------------------------------------
>
> Key: DRILL-4815
> URL: https://issues.apache.org/jira/browse/DRILL-4815
> Project: Apache Drill
> Issue Type: Improvement
> Components: Execution - Codegen
> Reporter: Jinfeng Ni
> Priority: Major
>
> We are seeing that for a relatively complex filter expression, Drill may
> spend ~ 10-20 seconds on run-time code compilation. Although it's true that
> the expression is a bit complex and the next same query would enjoy the
> benefit of cached run-time code, we still may have to consider way to reduce
> the time spent on the compilation when the query is processed for the 1st
> time, in order to make Drill more "interactive".
> For instance, for the following query, the log shows it spent 7 seconds on
> code compilation, while the query returns within 9 seconds.
> {code}
> select * from cp.`tpch/nation.parquet` t
> WHERE (((
> cast(substring(t.CID, 9) as integer) = 28)
> AND (((
> cast(substring(t.LID, 8) as
> integer) = 1)
> AND (((
>
> cast(substring(t.TYEAR, 11) as integer) = 2011)
> AND ((
> cast(t.GRP_ID
> as integer) IN (1,
>
> 2))
> AND (
>
> cast(t.VM_DATEID as integer) = 20111201)))
> OR ((
> cast(t.TYEAR as
> integer) = 2012)
> AND ((
> cast(t.GRP_ID
> as integer) IN (1,
>
> 2))
> AND (
>
> cast(t.VM_DATEID as integer)= 20121201)))
> OR ((
>
> cast(substring(t.TYEAR, 11) as integer) = 2013)
> AND ((
> cast(t.GRP_ID
> as integer) IN (1,
>
> 2))
> AND (
>
> cast(t.VM_DATEID as integer) = 20131201)))))
> OR ((
> cast(substring(t.LID, 8) as
> integer) = 2)
> AND (((
>
> cast(substring(t.TYEAR, 11) as integer) = 2011)
> AND ((
> cast(t.GRP_ID
> as integer) IN (-1,
>
> 1,
>
> 2))
> AND (
>
> cast(t.VM_DATEID as integer)= 20111201)))
> OR ((
> cast(t.TYEAR as
> integer) = 2013)
> AND ((
> cast(t.GRP_ID
> as integer) IN (-1,
>
> 1,
>
> 2))
> AND (
>
> cast(t.VM_DATEID as integer) = 20131201)))))))
> AND ((
> cast(t.FLAG as integer) = -1)
> OR (
> cast(t.FLAG as integer) = 0)) )
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)