Yesterday I was looking into large result sets and it appears that they don't work as implemented/documented(?). I did some googling around [1] and found a number of posts talking about how setFetchSize isn't being honored, some dating back as far as 2002. The MySQL docs [2] states "When using versions of the JDBC driver earlier than 3.2.1, and connected to server versions earlier than 5.0.3, the setFetchSize() method has no effect, other than to toggle result set streaming as described above.". The doc outlines some additional instructions on how to create a statement that is going to allow a streaming result set. After moving to a newer JDBC driver, I wrote a simple test using JDBC and it does work properly. Below is a snippet of the code [3] that I used to test this with JDBC, but I wasn't able to figure out how to make OpenJPA do the same.
Any thoughts/suggestions? [1] Google "mysql jdbc setFetchSize" [2]http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-implementation-notes.html [3] stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,java.sql.ResultSet.CONCUR_READ_ONLY); stmt.setFetchSize(Integer.MIN_VALUE); -- View this message in context: http://n2.nabble.com/Large-result-set-problem-on-MySQL-tp2617152p2617152.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.
