db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harshvardhan Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6940) Enhance derby statistics for more accurate selectivity estimates.
Date Mon, 26 Jun 2017 19:07:00 GMT

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

Harshvardhan Gupta commented on DERBY-6940:

Since I am performing deep copy of the objects, I don't think (min==max) will work in our
case. So I had to use the equality function that is implemented by each data type, the problem
is that I need to catch the StandardException thrown by those functions and I can't delegate
it to the writeExternal method since the interface definition won't let it compile.

I too believe that the code in present form is little clunky and open for potential improvements.

> 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_2.diff, DERBY-6940_3.diff, derby-6940.diff, EOFException_derby.log,
> 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
> We eventually want to utilize the new statistics to make better selectivity estimates
/ cost estimates that will help find the best query plan. Currently Derby keeps two type of
stats - the total row count and the number of unique values.
> We are initially extending the stats to include null count, the minimum value and maximum
value associated with each of the columns of an index. This would be useful in selectivity
estimates for operators such as [ IS NULL, <, <=, >, >= ] , all of which currently
rely on hardwired selectivity estimates.

This message was sent by Atlassian JIRA

View raw message