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 "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/08/15 22:17:13 UTC

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

Save optimizer costs in saved obejcts rather than as compiled byte code, reduces memory usage and generated class size.
-----------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-1699
                 URL: http://issues.apache.org/jira/browse/DERBY-1699
             Project: Derby
          Issue Type: Improvement
          Components: SQL
            Reporter: Daniel John Debrunner


 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 contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira