Package org.apache.derbyTesting.junit

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


       rs.next();

       if(usingEmbedded()){
           RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
           rs.close();
           assertTrue(rtsp.usedTableScan());
           assertFalse(rtsp.usedDistinctScan());
       }
       
        // just some more tests in different situations, not for
        // the bug 4316 many items
View Full Code Here


        rs.next();

        if(usingEmbedded()){
            RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
            rs.close();
            assertTrue(rtsp.usedTableScan());
            assertFalse(rtsp.usedDistinctScan());
        }
       
        st.close();
    }
View Full Code Here

       rs.next();

       if(usingEmbedded()){
           RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
           rs.close();
           assertTrue(rtsp.usedTableScan());
           assertFalse(rtsp.usedDistinctScan());
       }
       
        // nested loop exists join, right side should be
        // ProjectRestrict on index scan with start and stop keys
View Full Code Here

       rs.next();

       if(usingEmbedded()){
           RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
           rs.close();
           assertTrue(rtsp.usedTableScan());
           assertFalse(rtsp.usedDistinctScan());
       }
       
        // hash exists join, right side PR on hash index scan, no
        // start/stop key, next qualifier "=".
View Full Code Here

       rs.next();

       if(usingEmbedded()){
           RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
           rs.close();
           assertTrue(rtsp.usedTableScan());
           assertFalse(rtsp.usedDistinctScan());
       }
       
        // hash exists join, right side PR on hash index scan,
        // still no start/stop key, next qualifier "=". It still
View Full Code Here

        "AND m1.value='21857' 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.usedTableScan("TABLE2"));
    assertTrue(rtsp.whatSortingRequired());

        rs = s.executeQuery(sql1);
        String[][] result = {
                {"4294967297", "000001", "21857"},
View Full Code Here

   
    // distinct names should be returned
    // runtime statistics should not have Distinct Scan in it
    assertRowCount(3, s.executeQuery("select distinct name from (select name, id from names) as n"));
    RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertTrue(rtsp.usedTableScan());
    assertFalse(rtsp.usedDistinctScan());
   
    // distinct names should be returned
    // runtime statistics should have Distinct Scan in it
    assertRowCount(3, s.executeQuery("select distinct name from (select name from names) as n"));
View Full Code Here

   
    // distinct names should be returned
    // runtime statistics should have Distinct Scan in it
    assertRowCount(3, s.executeQuery("select distinct name from (select name from names) as n"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedTableScan());
    assertTrue(rtsp.usedDistinctScan());
   
    // runtime statistics should have Distinct Scan in it
    assertRowCount(6, s.executeQuery("select distinct a, b, b, a from (select y as a, x as b from (select id as x, name as y from names) as n) as m"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
View Full Code Here

    assertTrue(rtsp.usedDistinctScan());
   
    // runtime statistics should have Distinct Scan in it
    assertRowCount(6, s.executeQuery("select distinct a, b, b, a from (select y as a, x as b from (select id as x, name as y from names) as n) as m"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedTableScan());
    assertTrue(rtsp.usedDistinctScan());
   
    // runtime statistics should not have Distinct Scan in it
    assertRowCount(3, s.executeQuery("select distinct a, a from (select y as a from (select id as x, name as y from names) as n) as m"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
View Full Code Here

    assertTrue(rtsp.usedDistinctScan());
   
    // runtime statistics should not have Distinct Scan in it
    assertRowCount(3, s.executeQuery("select distinct a, a from (select y as a from (select id as x, name as y from names) as n) as m"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertTrue(rtsp.usedTableScan());
    assertFalse(rtsp.usedDistinctScan());
   
    s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0)");
    s.execute("drop table names");
    s.close();
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.