You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2013/09/09 22:20:54 UTC

[jira] [Commented] (DERBY-6156) Starting Derby 10.9, we do not not keep statistics for single-column unique index. Check the code to see optimizer calculates correct cost even with the missing stats for such indexes

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

Mamta A. Satoor commented on DERBY-6156:
----------------------------------------

I am looking at this issue. DERBY-6045 found the issue to be in estimateCost method. To start with, I will look at various subclasses of Optimizable to see if we rely on the statistics in those subclasses. Additionally, I will also search for TableDescriptor.statisticsExist method to see what classes rely on this call and if we need to account for missing stats for single-colunm unique indexes.
                
> Starting Derby 10.9, we do not not keep statistics for single-column unique index. Check the code to see optimizer calculates correct cost even with the missing stats for such indexes
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-6156
>                 URL: https://issues.apache.org/jira/browse/DERBY-6156
>             Project: Derby
>          Issue Type: Task
>          Components: SQL, Store
>            Reporter: Mamta A. Satoor
>              Labels: derby_triage10_11
>
> With DERBY-3790(Investigate if request for update statistics can be skipped for certain kind of indexes, one instance may be unique indexes based on one column.) we have stopped keeping statistics for single column unique index. But with DERBY-6045(in list multi-probe by primary key not chosen on tables with >256 rows), we found that optimizer code was not adjusted to tackle the missing stats and hence we were not picking index scan even though the single column unique index was the right choice. DERBY-6045 has been fixed but we should make sure there are no other places in the optimizer code where we have missed code changes to account for missing statistics for single-column unique indexes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira