Package org.apache.derbyTesting.junit

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


       if(usingEmbedded()){
           RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
           rs.close();
           assertTrue(rtsp.usedTableScan());
           assertFalse(rtsp.usedDistinctScan());
       }
       
       st.executeUpdate(
            " create index i12 on t1 (c1, c2)");
       
View Full Code Here


       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

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

       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

       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

    // 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"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
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);
    assertFalse(rtsp.usedTableScan());
View Full Code Here

   
    // 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);
    assertTrue(rtsp.usedTableScan());
View Full Code Here

   
    // 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

    Statement s = createStatement();
    s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
   
    assertRowCount(1, s.executeQuery("select distinct c2 from one"));
    RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertTrue(rtsp.usedDistinctScan());
   
    // Derby251 Distinct should not get eliminated for following query
    // because there is no equality condition on unique column of table
    // in the outside query
    assertRowCount(2, s.executeQuery("select distinct q1.\"NO1\",  q1.\"NAME\",  q1.\"AUDITOR_NO\",  q1.\"REPORTTO_NO\",  q1.\"DISCRIM_DEPT\",  q1.\"SOFTWAREASSET\" from IDEPT q1, IDEPT q2" +
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.