Reputation: 347
In an Oracle db, I have a query select * from tablehistory
How do I speed up my code?
String mayquery="select * from tablehistory";
try {
System.out.println("# start 0");
PreparedStatement preparedStatement = con.prepareStatement(mayquery);
System.out.println("# start 1");
ResultSet resultSet = preparedStatement.executeQuery();
System.out.println("# start 2");
int count =0;
System.out.println("# start 3");
while (resultSet.next()) {
System.out.println("start 4 count:"+count);
count++;
}
System.out.println("# end a");
System.out.println("count:"+count);
} catch(Exception e) {
}
Upvotes: 0
Views: 1228
Reputation: 181
Upvotes: 1