db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-1908) Investigate: What's the "unit" for optimizer cost estimates?
Date Fri, 29 Sep 2006 21:27:20 GMT
Investigate: What's the "unit" for optimizer cost estimates?

                 Key: DERBY-1908
                 URL: http://issues.apache.org/jira/browse/DERBY-1908
             Project: Derby
          Issue Type: Task
          Components: Performance, SQL
            Reporter: A B

Derby optimizer decisions are necessarily based on cost estimates.  But what are "units" for
these cost estimates?  There is logic in OptimizerImpl.getNextPermutation() that treats cost
estimates as if their unit is milliseconds--but is that really the case?

The answer to that question may in fact be "Yes, the units are milliseconds"--and maybe the
unexpected cost estimates that are sometimes seen are really caused by something else (ex.
DERBY-1905).  But if that's the case, it would be great to look at the optimizer costing code
(see esp. FromBaseTable.estimateCost()) to verify that all of the "magic" of costing really
makes sense given that the underlying unit is supposed to be milliseconds.

Also, if the stats/cost estimate calculations are truly meant to be in terms of milliseconds,
I can't help but wonder on what machine/criteria the determination of milliseconds is based.
 Is it time to update the stats for "modern" machines, or perhaps (shooting for the sky) to
dynamically adjust the millisecond stats based on the machine that's running Derby and use
the adjusted values somehow?  I have no answers to these questions, but I think it would be
great if someone out there was inclined to discuss/investigate these kinds of questions a
bit more...

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


View raw message