cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Razumovsky <razumovsky.and...@gmail.com>
Subject Re: Big selects on PostGres : Configuring Statement.setFetchSize() of a selectquery
Date Fri, 15 May 2009 09:03:13 GMT
Hi,

Yes of course. You can use SelectQuery.setFetchLimit(int) and
setFetchStart(int) methods. They do just that.

Andrey

2009/5/15 stefcl <stefatwork@gmail.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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message