Examples of usedDistinctScan()


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

   
    // Try same query, but with an order by at the end.  This will use the sort for
    // the "order by" to do the distinct and not do a "DISTINCT SCAN".
    assertRowCount(3, s.executeQuery("select distinct c2, c3 from two order by c2, c3"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
   
    // more than one table in the select list
    // Following runtime statistics output should have Eliminate duplicates = true
    assertRowCount(3, s.executeQuery("select distinct a.c1, b.c1 from one a, two b where a.c1 = b.c1 and b.c2 =1"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
View Full Code Here

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

    // Following runtime statistics output should NOT have Eliminate duplicates = true
    // single table queries
    // unique columns in select list
    assertRowCount(8, s.executeQuery("select distinct c1 from one"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
   
    assertRowCount(8, s.executeQuery("select distinct c1, c2 + c3 from one"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
View Full Code Here

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

    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());
   
    assertRowCount(8, s.executeQuery("select distinct c1, c2 + c3 from one"));
    rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

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

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

    assertFalse(rtsp.usedDistinctScan());
    assertFalse(rtsp.eliminatedDuplicates());

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

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

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

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

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

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

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

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

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

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

    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());
   
    // multi-table queries

    // 1 to 1 join, select list is superset
View Full Code Here

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

    // 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"));
    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());
View Full Code Here

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

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

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