Hi ,
i am reading 1000 Elements from a database (500.000 all together).
The problem is reading the data takes only a few miliseconds but
closing the ResultSet takes another 22 seconds. My Hard Disk tells me
that the ResultSet is probably running to the end of my table row by
row. Is there a way to tell mysql not to do this ?
Statement tempStmnt = aConnection.createStatement();
tempStmnt = aConnection.createStatement(
java.sql.ResultSet.TYPE_FORWARD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY);
tempStmnt.setFetchSize(Integer.MIN_VALUE);
Date tempStart = new Date();
ResultSet tempRs = tempStmnt.executeQuery("SELECT * FROM
ARTIKELSTAMMDATEN");
int tempXx = 0;
while (tempRs.next() && tempXx++ < aCount) {
tempRs.getString("artikelBezeichnung");
}
Regards Daniel Schneller