Examples of usedSpecificIndexForIndexScan()


Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_102 \n" +
                "where test.hundred = template.hundred and test.id <= 100").close();
        // note: original cloudscape result was expecting 3884.85 here.
        checkEstimatedRowCount(conn,3924.9);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEST", "TEST_ID"));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_102"));
       
        // join on hundred.
        // template inner, NL, index=null, 100 rows from outer
        s.executeQuery("select template.id from " +
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "where test.hundred = template.hundred and test.id <= 100").close();
        // note: original cloudscape result was expecting 3884.85 here.
        checkEstimatedRowCount(conn,3924.9);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEST", "TEST_ID"));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_102"));
       
        // join on hundred.
        // template inner, NL, index=null, 100 rows from outer
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "test, template --DERBY-PROPERTIES joinStrategy=nestedLoop, " +
                "index=null \n" +
                "where test.hundred = template.hundred and test.id <= 100").close();
        checkEstimatedRowCount(conn,3924.9);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEST", "TEST_ID"));
       
        // join on hundred.
        // template inner, hash, index=null, 100 rows from outer.
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=null \n" +
                "where test.hundred = template.hundred and test.id <= 100").close();
        checkEstimatedRowCount(conn,3924.9);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedHashJoin());
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEST", "TEST_ID"));
    }
   
    public void testMultiPredicate() throws SQLException {
        // multi predicate tests.
        // first do a oin involving twenty and two
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_two \n" +
                "where test.twenty = template.twenty " +
                "and test.two = template.two").close();
        checkEstimatedRowCount(conn,401000.625);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_TWO"));
       
        // join on twenty/two.
        // template inner, NL, index=template_twenty, all rows.
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_twenty \n" +
                "where test.twenty = template.twenty " +
                "and test.two = template.two").close();
        checkEstimatedRowCount(conn,401000.625);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_TWENTY"));
       
        // join on twenty/two. template inner, NL, index=template_22, all rows.
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
                "test, template --DERBY-PROPERTIES joinStrategy=nestedLoop, " +
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_22 \n" +
                "where test.twenty = template.twenty " +
                "and test.two = template.two").close();
        checkEstimatedRowCount(conn,401000.625);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_22"));
       
        // multi predicate tests continued
        // drop index twenty, two -- use above predicates
        // should be smart enough to figure out the selectivity by
        // combining twenty and two.
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_two \n" +
                "where test.twenty = template.twenty " +
                "and test.two = template.two").close();
        checkEstimatedRowCount(conn,401000.625);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_TWO"));
       
        // join on twenty/two. index twenty_two dropped.
        // template inner, NL, index=template_twenty, all rows.
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_twenty \n" +
                "where test.twenty = template.twenty " +
                "and test.two = template.two").close();
        checkEstimatedRowCount(conn,401000.625);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_TWENTY"));
       
        s.executeUpdate("drop index template_two");
       
        // we only have index template_twenty
        // for the second predicate we should use 0.1 instead of 0.5
View Full Code Here

Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.usedSpecificIndexForIndexScan()

                "index=template_twenty \n" +
                "where test.twenty = template.twenty " +
                "and test.two = template.two").close();
        checkEstimatedRowCount(conn,80200.12500000001);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_TWENTY"));
       
        // now drop index template_twenty
        // selectivity should become 0.1 * 0.1 = 0.01
        // 16 * 10^6 * .01 = 160,000
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.