From: Kris Jurka <books@ejurka.com>
To: Brian G. Huber <brianghuber@yahoo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Forcing use of cursor for large result sets
Date: Mon, 7 Jun 2004 02:50:21 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0406070248120.29634@leary.csoft.net> (raw)
In-Reply-To: <002e01c44b87$fd7bbe70$6400a8c0@bghthinkpad>
References: <002e01c44b87$fd7bbe70$6400a8c0@bghthinkpad>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, brianghuber@yahoo.com
Subject: Re: Forcing use of cursor for large result sets
In-Reply-To: <Pine.BSO.4.56.0406070248120.29634@leary.csoft.net>
References: <002e01c44b87$fd7bbe70$6400a8c0@bghthinkpad> <Pine.BSO.4.56.0406070248120.29634@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox