db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Optimizer Timeout question
Date Wed, 15 Nov 2006 18:06:07 GMT
I've been working my way through Army's awesome Wiki pages
and learning a lot about the Optimizer. I'm doing this in
the context of a problematic query of mine.

I've got a question about how Optimizer Timeout works. See
http://wiki.apache.org/db-derby/LanguageOptimize to set the
context for this question. In particular, I'm interested in
the interaction between the following code loop in
SelectNode.optimize and the optimizer timeout mechanism:

* Optimize this SelectNode */
while (optimizer.getNextPermutation())
{
     while (optimizer.getNextDecoratedPermutation())
     {
         optimizer.costPermutation();
     }
}

So here's the question: as I understand it, the Optimizer
Timeout mechanism kicks in during optimizer.getNextPermutation().
But what if the "inner" while loop has a very large number
of decorated permutations to cost for this particular pass through
the outer loop?

Shouldn't we be checking for timeout in the inner loop as well?

thanks,

bryan


Mime
View raw message