cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefcl <>
Subject Big selects on PostGres : Configuring Statement.setFetchSize() of a selectquery
Date Fri, 15 May 2009 08:49:45 GMT


Is there a way I could configure the fetch size of a SelectQuery?

In pure JDBC, in order to be able to handle a large resultset datarow by
datarow, I need to indicate to the JDBC driver that it should make use of
cursors by calling Statement.setFetchSize( int ).

If I don't, the driver waits until all rows are returned before giving
access to the ResultSet, which causes OutOfMemory exceptions.
Unfortunately, I haven't found how I could force a statement level fetch
size when working with SelectQuery objects in the cayenne API. 
(Warning: I'm not talking about paging here) 

Can someone help?

PS: I use postgresql jdbc4 driver.

View this message in context:
Sent from the Cayenne - User mailing list archive at

View raw message