Hi,
Yes of course. You can use SelectQuery.setFetchLimit(int) and
setFetchStart(int) methods. They do just that.
Andrey
2009/5/15 stefcl <stefatwor..mail.com>
>
> 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.
>
>
This archive was generated by hypermail 2.0.0 : Fri May 15 2009 - 05:03:50 EDT