You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2013/06/25 07:10:20 UTC

[jira] [Updated] (DERBY-1699) Save optimizer costs in saved obejcts rather than as compiled byte code, reduces memory usage and generated class size.

     [ https://issues.apache.org/jira/browse/DERBY-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-1699:
-----------------------------------

    Urgency: Normal
     Labels: derby_triage10_11  (was: )
    
> Save optimizer costs in saved obejcts rather than as compiled byte code, reduces memory usage and generated class size.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1699
>                 URL: https://issues.apache.org/jira/browse/DERBY-1699
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>              Labels: derby_triage10_11
>
>  A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The optimizer costs being passed in are rarely used, in some cases they are used as estimates for sizing items.
> They are also used if the plan is displayed, to show the costs.
> It's possible that the cost estimates could be saved in the saved objects structure of the plan and be available by
> result set number. E.g. .store a Hashtable in the saved objects with a key of "costEstimates", the hashtable would have a key of resultSetNumber and value of a StoreCostResult. This would also be a one time storage at compile time, rather than the current code which incurs a both a cpu and memory cost at runtime for each ResultSet and hence each active query. 
> This would apply to any node that takes an optimizer cost.
> This has been split out from DERBY-766

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira