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

Vladimir Sitnikov commented on CALCITE-4514:
--------------------------------------------

{quote}  It is at least better than compute from scratch every time it is 
needed. I am not sure if there is a better way.{quote}
Is it really needed to compute the set?
If the set is not needed, we do not need to add it to the cache either.

{quote} Performance side, this Jira is originally intended to fix and improve 
performance{quote}
We had recently seen a case when a small change resulted in a noticeable 
performance regression.

Of course, caching the {{Set<...>}} looks like to be "always faster", however, 
it might result in an unintentional memory leak.

> Fine tune the merge order of two RelSets, cache RelSet's childSet computation
> -----------------------------------------------------------------------------
>
>                 Key: CALCITE-4514
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4514
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Botong Huang
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When merging two relsets, we have two preferences: 
> 1. Merge parent relset into child relset
> 2. Merge newer relset into older relset
> Currently, when the two relsets are parent set of each other, we randomly 
> pick a merge order without checking the second condition above. For 
> performance reasons, we should, to avoid unnecessary churn. 



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

Reply via email to