Brian, after reading and reading and reading, I am going to investigate this 
patch more.  Amy's comment in DERBY-1905

        As described more in the discussions for DERBY-2130, I removed an 
"if-block" from OptimizerImpl that actually causes an infinite loop in        
lang/innerjoin.sql (I hacked around that before running derbyall). So that has 
to be resolved.

Is interesting and I am wondering if this was not hit somehow.  After testing 
with "derby.optimizer.noTimeout=true" I have satisfied to myself anyways, that 
it is not a bad plan or the computation of all plans that is the issue but 
rather some sort of looping, retrying, etc.   

I need to investigate more on this "jumping" and the patch and my stack traces 
and the code.

Thank you for pointing this issue out!

Brett

-----Original Message-----
From: Bryan Pendleton [mailto:[email protected]] 
Sent: Friday, March 14, 2014 10:10 AM
To: [email protected]
Subject: Re: I need help diagnosing a Derby engine problem where threads are 
not progressing

>>> My assumption is that there is a possibility that the optimization 
>>> may get into a state where it may take a very long time to complete 
>>> or may even be looping.

>>> So what I would like to explore is under what conditions could the 
>>> optimizer get into a state where it might loop or make no progress 
>>> for a very long period of time.

Are you able to try the patch for DERBY-2130 in your environment?

https://issues.apache.org/jira/browse/DERBY-2130

At the time that I was wrestling with this problem (years ago, sorry), I was 
experiencing great instability in optimization times.

Sometimes it would run in a few seconds.

Sometimes it would take 15 minutes.

If you can provide any feedback on whether the DERBY-2130 change alters the 
behaviors that you see, that would be great!

bryan

Reply via email to