db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Execution Plan Changes Dramatically between Executions
Date Sat, 21 Aug 2010 01:41:41 GMT
> So the question is, why does the optimizer suddenly get much smarter
> just because I restarted the database?  Is it caching the execution
> plan perhaps?  Can I make it be this smart all the time somehow?

Derby definitely caches the compiled form of the statement, and will re-use it.

There is a way to completely disable that cache, I believe, check
this bug report from some details:


Given the dramatic behavior changes in your situation, it would be
awfully useful if you could package up whatever information you can
about this and log it in the Derby Jira for future users benefit.

Ideally, if you could contribute a test program which demonstrates
the behavior that you describe, that would be great! But even things
like query plans of the good and bad behavior, descriptions of the
schemas, etc., can be of help.



View raw message