Examples of eliminatedDuplicates()


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

    // query returns single row
    assertRowCount(1, s.executeQuery("select distinct c2 from one where c1 = 3"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
   
    assertRowCount(1, s.executeQuery("select distinct c3 from one where c1 = 3"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
View Full Code Here

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

    assertFalse(rtsp.eliminatedDuplicates());
   
    assertRowCount(1, s.executeQuery("select distinct c3 from one where c1 = 3"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

    // super-set in select list
    assertRowCount(8, s.executeQuery("select distinct c2, c5, c1 from one"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
View Full Code Here

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

    // super-set in select list
    assertRowCount(8, s.executeQuery("select distinct c2, c5, c1 from one"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(9, s.executeQuery("select distinct c2, c3, c1 from two"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
View Full Code Here

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

    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(9, s.executeQuery("select distinct c2, c3, c1 from two"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
   
    // multi-table queries

    // 1 to 1 join, select list is superset
    assertRowCount(8, s.executeQuery("select distinct a.c1 from one a, one b where a.c1 = b.c1"));
View Full Code Here

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

    // 1 to 1 join, select list is superset
    assertRowCount(8, s.executeQuery("select distinct a.c1 from one a, one b where a.c1 = b.c1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(8, s.executeQuery("select distinct a.c1, 3 from one a, one b where a.c1 = b.c1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
View Full Code Here

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

    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(8, s.executeQuery("select distinct a.c1, 3 from one a, one b where a.c1 = b.c1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(9, s.executeQuery("select distinct a.c1, a.c3, a.c2 from two a, one b where a.c1 = b.c1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
View Full Code Here

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

    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(9, s.executeQuery("select distinct a.c1, a.c3, a.c2 from two a, one b where a.c1 = b.c1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(9, s.executeQuery("select distinct a.c1, a.c3, a.c2 from two a, two b where a.c1 = b.c1 and b.c3 = 1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
View Full Code Here

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

    assertFalse(rtsp.eliminatedDuplicates());

    assertRowCount(9, s.executeQuery("select distinct a.c1, a.c3, a.c2 from two a, two b where a.c1 = b.c1 and b.c3 = 1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

    //join between two tables using both columns of unique key
    assertRowCount(3, s.executeQuery("select distinct a.c1 from two a, four b where a.c1 = b.c1 and a.c3 = b.c3 and b.c3 = 1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
View Full Code Here

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

    //join between two tables using both columns of unique key
    assertRowCount(3, s.executeQuery("select distinct a.c1 from two a, four b where a.c1 = b.c1 and a.c3 = b.c3 and b.c3 = 1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
 
    s.execute("drop table temp_result");
    s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0)");
    s.close();
  }
View Full Code Here

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

     
    // first column of an index
    assertRowCount(4, s.executeQuery("select distinct c1 from t1 where 1=1"));
    RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertTrue(rtsp.eliminatedDuplicates());

    // equality predicate on preceding key columns
    assertRowCount(1, s.executeQuery("select distinct c2 from t1 where c1 = 1 and c3 = '1'"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
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.