db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <kristian.waa...@oracle.com>
Subject Re: Enabling automatic calculation of index statistics
Date Thu, 10 Feb 2011 22:54:19 GMT
On 27.01.11 18:16, Rick Hillegas wrote:
> Hi Kristian,
> Thanks for taking care of this while you are on leave. +1 to checking 
> in your patches. More inline...

FYI, I have now committed the remaining patches.

I have enabled logging by default for now, and the feature is also 
enabled by default.
Both the feature itself and the logging can be turned off explicitly 
using properties (I think they have all been described in DERBY-4771).

The easiest way to see if work is ongoing is to obtain a stack trace and 
see if the index statistics daemon thread is present. That thread will 
be created when needed and go away when there is no more work to do, so 
this technique is awkward for small tables...
Grepping for "istat" in derby.log will give you some information about 
what has happened. A summary will be printed to the log if you shut down 
the database properly.
You can also enable tracing for more detailed information. To see what 
the output looks like, run the test store.AutomaticIndexStatisticsTest 
with tracing/logging enabled.

Note that the feature is still somewhat experimental. Feel free to ask 
questions, I'll try to answer them as soon as I can. Again, I think 
DERBY-4771 is the issue that contains most information about the feature.


> On 1/26/11 12:11 PM, Kristian Waagan wrote:
>> Hello,
>> I plan to enable automatic calculation of index cardinality 
>> statistics by committing DERBY-4938 and DERBY-4939 (I have broken up 
>> the code from the latest DERBY-4771 patch, the patches are just not 
>> accessable for me right now).
>> Before I do that, I want to ask is people think the regression tests 
>> are stable enough.
> I think that Dag has just checked in a fix for an instability in the 
> regression tests related to interrupt handling. So that instability 
> should go away and there should be less noise obscuring instabilities 
> introduced by your statistics work, if any.
>> Enabling the auto-calculation may cause intermittent failures, since 
>> the work is carried out in a background thread. Tests that may 
>> experience failures are tests asserting on statistics and locks, and 
>> which also perform SQL queries using indexes ([1]). If you suspect 
>> the feature has caused an error, the first thing to do is to grep for 
>> "istat" in derby.log.
>> It would be helpful wrt debugging if there aren't many intermittent 
>> failures popping up already.
>> I can hold off for a while longer, but I want the feature to be 
>> tested of many different types of operating systems and hardware 
>> before 10.8.
> Yes, please.
> Thanks,
> -Rick
>> Opinions?
>> Regards,

View raw message