cayenne-user mailing list archives

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

Hello,

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: http://www.nabble.com/Big-selects-on-PostGres-%3A-Configuring-Statement.setFetchSize%28%29-of-a-selectquery-tp23555842p23555842.html
Sent from the Cayenne - User mailing list archive at Nabble.com.


Mime
View raw message