{"1"}, {"1"}, {"1"}, {"1"},
{"1"}, {"1"}, {"1"}, {"1"},
{"1"}, {"1"}, {"1"}, {"1"},
{"1"}, {"1"}, {"1"}, {"1"},
});
RuntimeStatisticsParser rtsp =
SQLUtilities.getRuntimeStatisticsParser(st);
assertTrue(rtsp.usedSpecificIndexForIndexScan("T1", "T1_C1"));
assertTrue(rtsp.usedSpecificIndexForIndexScan("T2", "T2_C2"));
JDBC.assertFullResultSet(
st.executeQuery("select 1 from " +
" --derby-properties joinOrder=fixed\n" +
"t1, t2 where t1.c1 = t2.c1"),
new String[][]{{"1"}, {"1"}, {"1"}, {"1"}, }
);
JDBC.assertFullResultSet(
st.executeQuery("select * from t1" +
" --derby-properties index = t1_c1\n" +
"left outer join t2 " +
"--derby-properties index = t2_c2\n" +
"on t1.c1 = t2.c1"),
new String[][]{
{"1", "1", "1", "1", "1", "1"},
{"2", "2", "2", "2", "2", "2"},
{"3", "3", "3", "3", "3", "3"},
{"4", "4", "4", "4", "4", "4"},
});
rtsp =
SQLUtilities.getRuntimeStatisticsParser(st);
assertTrue(rtsp.usedSpecificIndexForIndexScan("T1", "T1_C1"));
assertTrue(rtsp.usedSpecificIndexForIndexScan("T2", "T2_C2"));
st.close();
}