Examples of usedTableScan()


Examples of org.apache.derbyTesting.junit.RuntimeStatisticsParser.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);
    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

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

        expColNames = new String[] { "I", "P" };
        JDBC.assertColumnNames(rs, expColNames);
        JDBC.assertDrainResults(rs, 0);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected hash join", p.usedHashJoin());
        assertTrue("Expected table scan on T1", p.usedTableScan("T1"));
        assertTrue("Expected index row to base row for T3", p.usedIndexRowToBaseRow("T3"));
       
        // Multiple, non-flattenable subqueries, but NO UNIONs.  Shouldn't push
        // anything.
View Full Code Here

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

        expColNames = new String[] { "A", "I" };
        JDBC.assertColumnNames(rs, expColNames);
        JDBC.assertDrainResults(rs, 0);

        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected table scan on T3", p.usedTableScan("T3"));
        assertTrue("Expected table scan on T4", p.usedTableScan("T4"));

        // Additional tests with VALUES clauses. Mostly just
        // checking to make sure these queries compile and execute,
        // and to ensure that all predicates are enforced even if
View Full Code Here

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

        JDBC.assertColumnNames(rs, expColNames);
        JDBC.assertDrainResults(rs, 0);

        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected table scan on T3", p.usedTableScan("T3"));
        assertTrue("Expected table scan on T4", p.usedTableScan("T4"));

        // Additional tests with VALUES clauses. Mostly just
        // checking to make sure these queries compile and execute,
        // and to ensure that all predicates are enforced even if
        // they can't be pushed all the way down into a UNION. So
View Full Code Here

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

        "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

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

        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.usedTableScan("TABLE1"));
    assertTrue(rtsp.whatSortingRequired());
 
        rs = s.executeQuery(sql1);
        String[][] result = {
                {"4294967297", "000001", "21857"},
View Full Code Here

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

    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.usedTableScan("TABLE1"));
    assertTrue(rtsp.whatSortingRequired());

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

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

                       {"11", "hhhh"},
                 {"12", "rrrr"} };                    
    stmt.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");     
    JDBC.assertFullResultSet(stmt.executeQuery("select i, b from t3 FOR UPDATE"), expectedValues);
    RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(stmt);
    assertTrue(rtsp.usedTableScan());
    assertFalse(rtsp.usedDistinctScan());
    commit();

    PreparedStatement p = prepareStatement("select i, b from t3  where i = ? FOR UPDATE");
                p.setString(1, "7");
View Full Code Here

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

                p.setString(1, "7");
                p.executeQuery();
    String [][] expectedValues1 = { {"7", "iiii" } };
    JDBC.assertFullResultSet(p.getResultSet(), expectedValues1);
    RuntimeStatisticsParser rtsp2 = SQLUtilities.getRuntimeStatisticsParser(stmt);
    assertFalse(rtsp2.usedTableScan());
    assertFalse(rtsp2.usedDistinctScan());
    p.close();
    commit();

View Full Code Here

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

            {"4", "aaaa" },
            {"5", "jjjj" },
            {"6", "rrrr" } };
    JDBC.assertFullResultSet(p.getResultSet(), expectedValues2);
    RuntimeStatisticsParser rtsp3 = SQLUtilities.getRuntimeStatisticsParser(stmt);
    assertFalse(rtsp3.usedTableScan());
    assertFalse(rtsp3.usedDistinctScan());             
    p.close();
    commit();

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.