db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3955) test lang/selectivity.sql can be revived
Date Tue, 24 Mar 2009 17:01:54 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kathey Marsden updated DERBY-3955:
----------------------------------

    Attachment: derby-3955_sanityCheck_dont_commit_diff.txt

I started converting this test and ran into a couple issues  that I wanted to ask about. 
I am attaching what I have done so far as derby-3955_sanityCheck_dont_commit_diff.txt

1) We don't seem to print estimatedRowCount() with  runtime statistics output. I had to use
internal (but public) interfaces to get the estimated rowcount. Is this ok for a functional
test? Please sanity check the patch to confirm the approach is ok.

2) On the first test we need to check the estimated row count. In the old sql test, we have:
ij> -- choose whatever plan you want but the row estimate should be.
-- (n * n) * 0.5
get cursor c as 
'select template.id
from properties joinOrder=fixed test, template
where test.two = template.two';
ij> close c;

For Derby that's
 s.executeQuery("select template.id from --DERBY-PROPERTIES joinOrder=fixed\n" 
                + "test, template where test.two = template.two").close();         

Since tables test and template each have 4000 rows, according to the comment, I would think
the estimatedRowCount should be about 8000000. (In Cloudscape 5.1.60 it is actually 8020012
 which is close enough I guess.) in Derby 10.5, it is 1648057, which seems off from the comment.
 I can't easily  test with older Derby releases because I don't have optimizer directives
or update statistics.  Is the new estimated row count an expected change or a bug?




> test lang/selectivity.sql can be revived
> ----------------------------------------
>
>                 Key: DERBY-3955
>                 URL: https://issues.apache.org/jira/browse/DERBY-3955
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Myrna van Lunteren
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: DERBY-3955.diff1, derby-3955_sanityCheck_dont_commit_diff.txt
>
>
> One test that was contributed during the IBM contribution of derby code was not runnable
at the time - lang/selectivity.sql.
> This test is still there, and I think might have some valuable regression tests if it
gets adapted to the current functionality in Derby.
> Ideally too, it should get converted to junit, or at least be made to run through the
langScripts junit suite.

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


Mime
View raw message