Re: Server side resultset search (for performance reasons) - Mailing list pgsql-jdbc

From Felipe Schnack
Subject Re: Server side resultset search (for performance reasons)
Date
Msg-id 20030804111748.047f4169.felipes@ritterdosreis.br
Whole thread Raw
In response to Re: Server side resultset search (for performance reasons)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
Talking about cursors, please, someone can explain me why I can't use setFetchSize() using the CVS version of the
JDBCdriver? I get the following error. There are no problem in the SQL query I'm sending to the backend, if I don't use
setFecthSize()everything runs fine. 

java.sql.SQLException: ERROR:  parser: parse error at or near "null" at character 23

    at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:286)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:104)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:66)
    at org.postgresql.jdbc1.AbstractJdbc1ResultSet.next(AbstractJdbc1ResultSet.java:135)
    at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:135)



On Mon, 04 Aug 2003 10:05:40 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> >> The application is returning 300,000 records in some SELECT clause (a
> >> ResultSet) this finish the client's JVM memory, so my solution to this
> >> was to use the SELECT's LIMIT clause returning 600 records and making
> >> the internal logic that when the user gets past the 600th record the
> >> application automatically issues another query with LIMIT and OFFSET
> >> clauses causing a little delay but this is better than finishing the
> >> memory in the client's machine (if you know a better solution or have
> >> some advices, please let me know).
>
> I'm surprised no one has yet suggested using a cursor.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org


--

 /~\ The ASCII        Felipe Schnack (felipes@ritterdosreis.br)
 \ / Ribbon Campaign  Analista de Sistemas
  X  Against HTML     Cel.: 51-91287530
 / \ Email!           Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone: 51-32303341

pgsql-jdbc by date:

Previous
From: Nic
Date:
Subject: Re: Server side resultset search (for performance reasons)
Next
From: Felipe Schnack
Date:
Subject: Re: java object store