| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | "Brian G(dot) Huber" <brianghuber(at)yahoo(dot)com> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Forcing use of cursor for large result sets |
| Date: | 2004-06-07 07:50:21 |
| Message-ID: | Pine.BSO.4.56.0406070248120.29634@leary.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Sun, 6 Jun 2004, Brian G. Huber wrote:
> Hello all -
>
> I am attempting to force the use of a cursor for a resultset. I have
> tried both forward-only and scrollable statements and am setting fetch
> size to 100 with a call to setFechSize(100) on the statement. However,
> I do not think a cursor is being used because the entire result set is
> trying to cache, resulting in an outofMemoryError. I am using
> pg74.213.jdbc3.jar with 7.4.2.
>
Two additional restrictions in the current driver are that you must be in
a transaction by setting setAutoCommit(false) and that the query in
question be a single sql statement. The single statement test is a bit
naive, so a semi-colon in the query string will make it think it is a
multi-statement query.
Kris Jurka
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kris Jurka | 2004-06-07 09:26:38 | Re: Using a COPY...FROM through JDBC? |
| Previous Message | Markus Schaber | 2004-06-07 07:47:58 | Re: Using a COPY...FROM through JDBC? |