Big selects on PostGres : Configuring Statement.setFetchSize() of a selectquery

From: stefcl (stefatwor..mail.com)
Date: Fri May 15 2009 - 04:49:45 EDT

  • Next message: Andrey Razumovsky: "Re: Big selects on PostGres : Configuring Statement.setFetchSize() of a selectquery"

    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 - 04:50:21 EDT