Examples of usedHashJoin()


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

        p = SQLUtilities.getRuntimeStatisticsParser(st);
        // DERBY-3819 - this test case consistently fails for 64 bit
        // temporarily (until 3819 is fixed by changing the queries with optimizer directives)
        if (!is64BitJVM()) {
            assertTrue("Expected Table Scan ResultSet for T3", p.usedTableScan("T3"));
            assertTrue("Expected Hash Join",p.usedHashJoin());
        }

        // If we
        // have nested unions, the predicate should get pushed all
        // the way down to the base table(s) for every level of
View Full Code Here

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

                { "5", "10", "5", "10" } };

        JDBC.assertFullResultSet(rs, expRS, true);

        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected Hash Join", p.usedHashJoin());
        // Can't
        // push predicates into VALUES clause. We'll try to push
        // it to X1, but it will only make it to T4; it won't make
        // it to T3 because the "other side" of the union with T3
        // is a VALUES clause. So we'll see an index scan on T4
View Full Code Here

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

                { "4", "8", "4", "8" }, { "5", "10", "5", "10" } };

        JDBC.assertFullResultSet(rs, expRS, true);

        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected hash join", p.usedHashJoin());

        // When we
        // have very deeply nested union queries, make sure
        // predicate push- down logic still works (esp. the scoping
        // logic). These queries won't return any results, but the
View Full Code Here

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

        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        // DERBY-3819 - this test case consistently fails for 64 bit
        // temporarily (until 3819 is fixed by changing the queries with optimizer directives)
        if (!is64BitJVM()) {
            assertTrue("Expected hash join", p.usedHashJoin());
        }
        //  Outer
        // predicate should either get pushed to V2 (T3 and T4) or
        // else used for a hash join; similarly, inner predicate
        // should either get pushed to T3 or else used for hash
View Full Code Here

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

                { "4", "-8", "4", "4" }, { "4", "8", "4", "4" },
                { "4", "-8", "4", "16" }, { "4", "8", "4", "16" }};
       
        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected hash join", p.usedHashJoin());

        // Inner predicates treated as restrictions, outer
        // predicate either pushed to X2 (T2 and T1) or used for
        // hash join between X2 and X1.
View Full Code Here

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

        JDBC.assertFullResultSet(rs, expRS, true);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        // DERBY-3819 - this test case consistently fails for 64 bit
        // temporarily (until 3819 is fixed by changing the queries with optimizer directives)
        if (!is64BitJVM()) {
            assertTrue("Expected hash join", p.usedHashJoin());
        }
        // Following queries deal with nested subqueries, which
        // deserve extra testing because "best paths" for outer
        // queries might not agree with "best paths" for inner
View Full Code Here

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

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

        expColNames = new String[] { "A", "I" };
        JDBC.assertColumnNames(rs, expColNames);
        JDBC.assertDrainResults(rs, 0);
        p = SQLUtilities.getRuntimeStatisticsParser(st);
        assertTrue("Expected hash join", p.usedHashJoin());
        assertTrue("Expected index scan on T3", p.usedIndexScan("T3"));
        assertTrue("Expected index scan on T4", p.usedIndexScan("T4"));

        // Same as
        // above but without the inner predicate (so no hash on T6).
View Full Code Here

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

                "test, template --DERBY-PROPERTIES joinStrategy=hash \n" +
                "where test.two = template.two").close();
        checkEstimatedRowCount(conn,8020012.5);
        RuntimeStatisticsParser rtsp =
              SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedHashJoin());
       
        // choose NL join, no index. Selectivity should be the same
        // join on two. template inner, NL, no index, all rows.
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
View Full Code Here

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

                "test, template --DERBY-PROPERTIES joinStrategy=nestedLoop, " +
                "index=null \n" +
                "where test.two = template.two").close();
        checkEstimatedRowCount(conn,8020012.5);
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertFalse(rtsp.usedHashJoin());
       
        // choose NL join, index template_two. Selectivity should be the same
        // join on two. template inner, NL, index=two, all rows.
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" +
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.