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) {
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.