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

Harshvardhan Gupta commented on DERBY-6942:
-------------------------------------------

I experimented with integrating max and min values similar to null values. 
Unlike a straightforward null count, the primary challenge associated with this 
problem is that we are going to need to define a distance metric with each of 
the sql types in derby.

For each example we need a procedure associate with varchar datatype which will 
tell derby that a string starting with 'L' is approximately equally far away 
from string startings with 'A' and 'Z'.(and thus give away a selectivity of 50% 
instead of relying on hardwired estimates)

For some data types this is going to be quite straightforward like for int, 
long etc. Nevertheless, extensive testing is going to be required for each of 
the data type which is integrated in the above process.

> Utilise additional statistics for selectivity estimates.
> --------------------------------------------------------
>
>                 Key: DERBY-6942
>                 URL: https://issues.apache.org/jira/browse/DERBY-6942
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Harshvardhan Gupta
>            Assignee: Harshvardhan Gupta
>            Priority: Minor
>         Attachments: DERBY-6942.diff, z12.txt, z13.txt
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to