做一个
SELECt COUNT(*) FROM…查询,而不是。
要么
int size =0;if (rs != null) { rs.last(); // moves cursor to the last row size = rs.getRow(); // get row id }无论哪种情况,你都不必遍历整个数据。

做一个
SELECt COUNT(*) FROM…查询,而不是。
要么
int size =0;if (rs != null) { rs.last(); // moves cursor to the last row size = rs.getRow(); // get row id }无论哪种情况,你都不必遍历整个数据。