ResultSet rs = null;
rs = st.executeQuery(
"values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()");
rs.next();
if(usingEmbedded()){
RuntimeStatisticsParser rtsp = new RuntimeStatisticsParser(rs.getString(1));
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"))
{
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));
if (expDelRowsV!=null)
assertTrue(rtsp.findString("Number of deleted rows visited="+expDelRowsV, 1));
assertTrue(rtsp.findString("Number of pages visited="+expPages, 1));
assertTrue(rtsp.findString("Number of rows qualified="+expRowsQ, 1));
assertTrue(rtsp.findString("Number of rows visited="+expRowsV, 1));
assertTrue(rtsp.findString("Scan type="+expScanType, 1));
assertTrue(rtsp.getStartPosition()[1].indexOf(expStartPosition)>1);
assertTrue(rtsp.getStopPosition()[1].indexOf(expStopPosition)>1);
if (expQualifier.equals("None"))
assertTrue(rtsp.hasNoQualifiers());
else if (expQualifier.equals("Equals"))
assertTrue(rtsp.hasEqualsQualifier());
if (expQualifierInfo !=null)
assertTrue(rtsp.findString(expQualifierInfo, 1));
}
}