Examples of usedSpecificIndexForIndexScan()


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

                "where test.hundred = template.hundred " +
                "and 1 = template.two").close();
        checkEstimatedRowCount(conn,80200.125);
        RuntimeStatisticsParser rtsp =
                SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_102"));
       
        // hundred and twenty
        // we can use statistics for 100,2 to get selectivity for 100 and
        // twenty and twenty to get selectivity for 20
        // selectivity should 0.01 * 0.05 = 0.0005 -> 80,000
View Full Code Here

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

                "index=template_102 \n" +
                "where test.hundred = template.hundred " +
                "and 1 = template.twenty").close();
        checkEstimatedRowCount(conn,8020.0125);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("TEMPLATE", "TEMPLATE_102"));
    }
   
    public void testThreeWayJoins() throws SQLException {
        setAutoCommit(false);
        Connection conn = getConnection();
View Full Code Here

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

        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.findString("Table Scan ResultSet for T1", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={0, 3}", 1));
        assertTrue(rtsp.findString("Hash Scan ResultSet for T2", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 3}", 1));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T3", "T3_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
       
        s.executeQuery("select t1.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
                "t1, t2 --DERBY-PROPERTIES joinStrategy=hash \n, t3 " +
View Full Code Here

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

        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.findString("Table Scan ResultSet for T3", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 3}", 1));
        assertTrue(rtsp.findString("Hash Scan ResultSet for T2", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 3}", 1));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T1", "T1_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
       
        s.executeQuery("select t1.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
                "t2, t3 --DERBY-PROPERTIES joinStrategy=nestedLoop \n, t1 " +
View Full Code Here

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

                "and t1.hundred = t3.hundred").close();
        checkEstimatedRowCount(conn,3212015.00625);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.findString("Table Scan ResultSet for T2", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 3}", 1));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T3", "T3_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
        assertTrue(rtsp.findString("Hash Scan ResultSet for T1", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={0, 3}", 1));
       
        s.executeQuery("select t1.id from " +
View Full Code Here

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

                "and t2.two = t3.two " +
                "and t1.hundred = t3.hundred " +
                "and t1.hundred='1'").close();
        checkEstimatedRowCount(conn,30458.025);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T2", "T2_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
        assertTrue(rtsp.findString("Hash Scan ResultSet for T3", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 3}", 1));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T1", "T1_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
View Full Code Here

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

        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T2", "T2_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
        assertTrue(rtsp.findString("Hash Scan ResultSet for T3", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 3}", 1));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T1", "T1_HUNDRED"));
        assertTrue(rtsp.findString("Bit set of columns fetched=All", 1));
       
        // we have t1.100=t2.100 and t1.100=t3.100, so
        // t2.100=t3.100 is redundant.
        // row count shouldn't factor in the redundant predicate.
View Full Code Here

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

                "and t2.twenty = t3.twenty").close();
        checkEstimatedRowCount(conn,1.606007503125E7);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.findString("Table Scan ResultSet for T1", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={0, 3}", 1));
        assertTrue(rtsp.usedSpecificIndexForIndexScan("T3", "T3_TWO_TWENTY"));
        assertTrue(rtsp.findString("Bit set of columns fetched={0, 1}", 1));
        assertTrue(rtsp.findString("Hash Scan ResultSet for T2", 1));
        assertTrue(rtsp.findString("Bit set of columns fetched={1, 2, 3}", 1));
       
        s.executeQuery("select t1.id from " +
View Full Code Here

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

        "ORDER BY m0.value";

        s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
        ResultSet rs = s.executeQuery(sql1);
    RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertTrue(rtsp.usedSpecificIndexForIndexScan("TABLE2","KEY3"));
    assertTrue(rtsp.whatSortingRequired());
 
        rs = s.executeQuery(sql1);
        String[][] result = {
                {"4294967297", "000001", "21857"},
View Full Code Here

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

    s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
        ResultSet rs = s.executeQuery(sql1);
    RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(
        s);
    assertTrue(rtsp.usedSpecificIndexForIndexScan("TABLE2","KEY3"));
    assertTrue(rtsp.whatSortingRequired());

    rs = s.executeQuery(sql1);
        String[][] result = {
                {"4294967297", "000001", "21857"},
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.