}
}
printTimeMemory("select", System.currentTimeMillis() - time);
// select randomized
Random random = new Random(1);
time = System.currentTimeMillis();
prep = conn.prepareStatement("SELECT * FROM TEST WHERE ID = ?");
for (int i = 0; i < len; i++) {
prep.setInt(1, random.nextInt(len));
ResultSet rs = prep.executeQuery();
rs.next();
assertFalse(rs.next());
if (i % 50000 == 0) {
trace(" " + (100 * i / len) + "%");
}
}
printTimeMemory("select randomized", System.currentTimeMillis() - time);
// delete
time = System.currentTimeMillis();
prep = conn.prepareStatement("DELETE FROM TEST WHERE ID = ?");
for (int i = 0; i < len; i++) {
prep.setInt(1, random.nextInt(len));
prep.executeUpdate();
if (i % 50000 == 0) {
trace(" " + (100 * i / len) + "%");
}
}