Package org.apache.derbyTesting.junit

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


            ps.execute();
        } else {
          s.execute("DELETE FROM MT_GAF_TOP_LEVEL_TERM_COUNTS WHERE (term = 2) ");
        }
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedIndexScan());

        if (useParameterMarkers) {
            ps = prepareStatement("DELETE FROM mt_gaf_top_level_term_counts WHERE (term = ?) OR (mt = ?)");
            ps.setInt(1,3);
            ps.setInt(2,4);
View Full Code Here


            ps.execute();
        } else {
          s.execute("DELETE FROM mt_gaf_top_level_term_counts WHERE (term = 5) OR (mt = 6)");
        }
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedIndexScan());
    }

    /**
     * Executes three different types of queries ("strategies") repeatedly
     * with an increasing number of values in the IN list.  Underneath we
View Full Code Here

                    DERBY_6045_DATA_TABLE +
                    " WHERE TERM_ID = 11");
        }
       
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedIndexScan());

        if (useParameterMarkers) {
            ps = prepareStatement("SELECT * FROM " + whiteSpace +
                    DERBY_6045_DATA_TABLE +
                    " WHERE (TERM_ID = ?) OR " +
View Full Code Here

                    DERBY_6045_DATA_TABLE +
                    " WHERE (TERM_ID = 11) OR " +
                    "(TERM_ID =21) OR (TERM_ID = 31)");
        }
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedIndexScan());

        if (useParameterMarkers) {
            ps = prepareStatement("SELECT * FROM " + whiteSpace +
                    DERBY_6045_DATA_TABLE +
                    " WHERE (TERM_ID IN (?, ?, ?))");
View Full Code Here

            s.executeQuery("SELECT  *  FROM " + whiteSpace +
                    DERBY_6045_DATA_TABLE +
                    " WHERE (TERM_ID IN (11, 21, 31))");
        }
        rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
        assertTrue(rtsp.usedIndexScan());
        s.close();
    }

    public void testDerby3603()
        throws SQLException
View Full Code Here

            return false;

        RuntimeStatisticsParser rsp =
            new RuntimeStatisticsParser(rStat.getString(1));

        return (rsp.usedIndexRowToBaseRow() && rsp.usedIndexScan()
            && (rsp.rowsQualifiedEquals(expRowCount)));
    }

    /**
     * Helper class: An instance of DataRow represents a single row
View Full Code Here

            rs.close();
            if (expectedScan.equals("Table"))
                    assertTrue(rtsp.usedTableScan());
            else if (expectedScan.equals("Index"))
            {
                assertTrue(rtsp.usedIndexScan());
                assertTrue(rtsp.usedSpecificIndexForIndexScan(
                        expTableInIndexScan, expIndexInIndexScan));
            }
            else if (expectedScan.equals("Constraint"))
            {
View Full Code Here

                assertTrue(rtsp.usedSpecificIndexForIndexScan(
                        expTableInIndexScan, expIndexInIndexScan));
            }
            else if (expectedScan.equals("Constraint"))
            {
                assertTrue(rtsp.usedIndexScan());
                assertTrue(rtsp.usedConstraintForIndexScan(
                        expTableInIndexScan));
            }
            assertTrue(rtsp.findString("Bit set of columns fetched="+expBits, 1));
            assertTrue(rtsp.findString("Number of columns fetched="+expNumCols, 1));
View Full Code Here

            return false;

        RuntimeStatisticsParser rsp =
            new RuntimeStatisticsParser(rStat.getString(1));

        return (rsp.usedIndexRowToBaseRow() && rsp.usedIndexScan()
            && (rsp.rowsQualifiedEquals(expRowCount)));
    }

    /**
     * Helper class: An instance of DataRow represents a single row
View Full Code Here

        try {
            if (expectedScan.equals("Table"))
                    assertTrue(rtsp.usedTableScan());
            else if (expectedScan.equals("Index"))
            {
                assertTrue(rtsp.usedIndexScan());
                assertTrue(rtsp.usedSpecificIndexForIndexScan(
                        expTableInIndexScan, expIndexInIndexScan));
            }
            else if (expectedScan.equals("Constraint"))
            {
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.