db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4121) Documentation: more UPDATE_STATISTICS fixes needed for Reference Manual and Tuning Derby
Date Fri, 27 Mar 2009 10:54:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689873#action_12689873

Knut Anders Hatlen commented on DERBY-4121:

My understanding of the code is that we store the number of unique values, not the average
number of duplicates. The selectivity is calculated this way (from StatisticsImpl.java):

	public double selectivity(Object[] predicates)
		if (numRows == 0.0)
			return 0.1;

		/* xxxSTATresolve: for small values of numRows, should we do something
		 * special? 
		return (double)(1/(double)numUnique);

If the number of rows is doubled, and the average number of duplicates per value doesn't change,
this method will return a selectivity that is two times as high as it should be if we don't
update the statistics.

> Documentation: more UPDATE_STATISTICS fixes needed for Reference Manual and Tuning Derby
> ----------------------------------------------------------------------------------------
>                 Key: DERBY-4121
>                 URL: https://issues.apache.org/jira/browse/DERBY-4121
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions:
>            Reporter: Kim Haase
>            Priority: Minor
> Kathey Marsden comments on DERBY-3787:
> Not a show stopper for the release, but in beginning my buddy testing,
>  I noticed the examples should use CALL e.g.
> Also in the Tuning Guide under Working with Cardinality Statistics -> When Cardinality
Statistics Go Stale we should refer users to the SYSCS_UTIL.SYSCS_UPDATE_STATISTICS stored
procedure to update their statistics and cross reference the reference guide.
> Myrna van Lunteren suggests a new issue for this, so I'm filing it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message