From: | Felipe Schnack <felipes(at)ritterdosreis(dot)br> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jesus Sandoval <meli(at)mzt(dot)megared(dot)net(dot)mx>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Server side resultset search (for performance reasons) |
Date: | 2003-08-04 14:17:48 |
Message-ID: | 20030804111748.047f4169.felipes@ritterdosreis.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Talking about cursors, please, someone can explain me why I can't use setFetchSize() using the CVS version of the JDBC driver? 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(at)sss(dot)pgh(dot)pa(dot)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(at)ritterdosreis(dot)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(at)ritterdosreis(dot)br
Fone: 51-32303341
From | Date | Subject | |
---|---|---|---|
Next Message | Jesus Sandoval | 2003-08-04 14:23:35 | Re: Server side resultset search (for performance reasons) |
Previous Message | Felipe Schnack | 2003-08-04 14:16:41 | Re: java object store |