Package org.apache.derbyTesting.junit

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


        rs.next();

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

    public void testdDerby2924() throws Exception
View Full Code Here


        rs.next();

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

    public void testdDerby5659() throws SQLException
View Full Code Here

        expRS = new String[][] { { "2", "1" }, { "4", "2" }, { "6", "3" },
                { "8", "4" } };

        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected distinct scan on T1", p.usedDistinctScan("T1"));
        assertTrue("Expected distinct scan  T3", p.usedDistinctScan("T3"));
   
      
      
        rs = st
View Full Code Here

                { "8", "4" } };

        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected distinct scan on T1", p.usedDistinctScan("T1"));
        assertTrue("Expected distinct scan  T3", p.usedDistinctScan("T3"));
   
      
      
        rs = st
                .executeQuery("select x1.j, x2.b from (select distinct i,j from "
View Full Code Here

        expRS = new String[][] { { "2", "1" }, { "2", "1" }, { "4", "2" },
                { "4", "2" }, { "6", "3" }, { "6", "3" }, { "8", "4" },
                { "8", "4" }};
        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected distinct scan on T1", p.usedDistinctScan("T1"));
        assertTrue("Expected distinct scan  T2", p.usedDistinctScan("T2"));
        assertTrue("Expected distinct scan on T3", p.usedDistinctScan("T3"));
        assertTrue("Expected distinct scan  T4", p.usedDistinctScan("T4"));
  
        // Multiple subqueries that are UNIONs. Outer-most
View Full Code Here

                { "4", "2" }, { "6", "3" }, { "6", "3" }, { "8", "4" },
                { "8", "4" }};
        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected distinct scan on T1", p.usedDistinctScan("T1"));
        assertTrue("Expected distinct scan  T2", p.usedDistinctScan("T2"));
        assertTrue("Expected distinct scan on T3", p.usedDistinctScan("T3"));
        assertTrue("Expected distinct scan  T4", p.usedDistinctScan("T4"));
  
        // Multiple subqueries that are UNIONs. Outer-most
        // predicate X0.b = X2.j can be pushed to union X0 but NOT
View Full Code Here

                { "8", "4" }};
        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected distinct scan on T1", p.usedDistinctScan("T1"));
        assertTrue("Expected distinct scan  T2", p.usedDistinctScan("T2"));
        assertTrue("Expected distinct scan on T3", p.usedDistinctScan("T3"));
        assertTrue("Expected distinct scan  T4", p.usedDistinctScan("T4"));
  
        // Multiple subqueries that are UNIONs. Outer-most
        // predicate X0.b = X2.j can be pushed to union X0 but NOT
        // to subquery X2. Inner predicate T6.p = X1.i is eligible
View Full Code Here

        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected distinct scan on T1", p.usedDistinctScan("T1"));
        assertTrue("Expected distinct scan  T2", p.usedDistinctScan("T2"));
        assertTrue("Expected distinct scan on T3", p.usedDistinctScan("T3"));
        assertTrue("Expected distinct scan  T4", p.usedDistinctScan("T4"));
  
        // Multiple subqueries that are UNIONs. Outer-most
        // predicate X0.b = X2.j can be pushed to union X0 but NOT
        // to subquery X2. Inner predicate T6.p = X1.i is eligible
        // for being pushed into union X1. In this case outer
View Full Code Here

                 {"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");
                p.executeQuery();
View Full Code Here

                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();


    p = prepareStatement("select i, b from t3 where i < ? FOR UPDATE");
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.