[ 
https://issues.apache.org/jira/browse/CALCITE-3460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16963260#comment-16963260
 ] 

Julian Hyde commented on CALCITE-3460:
--------------------------------------

It's important to write a test. It doesn't have to hard fail if there is a 
regression, but it does have to demonstrate significant performance difference 
(100x or more) before and after the fix. {{SqlValidatorTest.testLarge()}} is an 
example.

> Poor performance in RexReplacer for large queries
> -------------------------------------------------
>
>                 Key: CALCITE-3460
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3460
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Haisheng Yuan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> We have queries that have tens of thousands of RexCalls. 
> reducibleExps.indexOf(call) is an O(n) operation, which takes 50% of the 
> running time, causing the query runs for ever until timed out.
> In RexShuttle, ImmutableList iterator creation in {{visitList}} takes another 
> 5~7% of running time, and it is creating millions of temporary iterator 
> object, not only time consuming, but also memory consuming.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to