[jira] [Comment Edited] (DERBY-6940) Enhance derby statistics for more accurate selectivity estimates.
[ https://issues.apache.org/jira/browse/DERBY-6940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16053198#comment-16053198 ] Harshvardhan Gupta edited comment on DERBY-6940 at 6/18/17 1:56 PM: Attaching an initial patch which add the following statistics information - 1) The minimum value of each column appearing in an index. 2) The maximum value of each column appearing in an index. 3) The null counts for each column appearing in an index. I am currently storing column level values for minValue and maxValue as DataValueDescriptor object. I am not entirely sure if this is the best way to store it for later use in comparison for determining selectivity estimates. To invoke the procedure extraStatistics call SYSCS_UTIL.SYSCS_UPDATE_STATISTICS(). Currently the extraStatistics procedure is not invoked by the create Index statement, we will need to write a variant for "Create Index" statements to collect the extra statistics during index creation time as well. was (Author: harshvardhan145): Attaching an initial patch which add the following statistics information - 1) The minimum value of each column appearing in an index. 2) The maximum value of each column appearing in an index. 3) The null counts for each column appearing in an index. I am currently storing column level values as DataValueDescriptor object. I am not entirely sure if this is the best way to store it for later use in comparison for determining selectivity estimates. To invoke the procedure extraStatistics call SYSCS_UTIL.SYSCS_UPDATE_STATISTICS(). Currently the extraStatistics procedure is not invoked by the create Index statement, we will need to write a variant for "Create Index" statements to collect the extra statistics during index creation time as well. > Enhance derby statistics for more accurate selectivity estimates. > - > > Key: DERBY-6940 > URL: https://issues.apache.org/jira/browse/DERBY-6940 > Project: Derby > Issue Type: Sub-task > Components: SQL >Reporter: Harshvardhan Gupta >Assignee: Harshvardhan Gupta >Priority: Minor > Attachments: derby-6940.diff > > > Derby should collect extra statistics during index build time, statistics > refresh time which will help optimizer make more precise selectivity > estimates and chose better execution paths. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Comment Edited] (DERBY-6940) Enhance derby statistics for more accurate selectivity estimates.
[ https://issues.apache.org/jira/browse/DERBY-6940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16053201#comment-16053201 ] Harshvardhan Gupta edited comment on DERBY-6940 at 6/18/17 1:53 PM: Additionally we need to work on upgrade procedures, while trying to access statistics info of an index created before this patch, Derby will throw a NPE due to absence of the new statistics in those indexes. was (Author: harshvardhan145): Additionally we need to work on upgrade procedures, while trying to access statistics info of an index created before this patch, Derby will throw a NPE due to absence of the new statistics. > Enhance derby statistics for more accurate selectivity estimates. > - > > Key: DERBY-6940 > URL: https://issues.apache.org/jira/browse/DERBY-6940 > Project: Derby > Issue Type: Sub-task > Components: SQL >Reporter: Harshvardhan Gupta >Assignee: Harshvardhan Gupta >Priority: Minor > Attachments: derby-6940.diff > > > Derby should collect extra statistics during index build time, statistics > refresh time which will help optimizer make more precise selectivity > estimates and chose better execution paths. -- This message was sent by Atlassian JIRA (v6.4.14#64029)