For batch processing I need to process all rows in a table. If the table is
too big, this leads to an OutOfMemoryException. I've found this article as
an solution:
http://bugs.mysql.com/bug.php?id=7698
with using
stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWA RD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY);
stmt.setFetchSize(Integer.MIN_VALUE);
The problem is, that while streaming the table is locked. The article says:
"This is going to be fixed in MySQL 5.0". I ***ume that the "select * from
bigTable" was meant, but I've tried it with MySQL 5.0.32 and it still
throws the OutOfMemoryException, when trying without the two lines above
(with the latest JConnector).
So my question is: How can I iterate all rows of a big table, without
locking the table (allowing parallel read/write), with JDBC?
--
Frank Buss,
EMAIL REMOVED http://www.frank-buss.de,
http://www.it4-systems.de