From: Marc Herbert <Marc.Herbert@emicnetworks.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: OutOfMemoryError
Date: Mon, 29 Aug 2005 21:03:36 +0200
Message-ID: <877je4o99z.fsf@meije.emic.fr> (raw)
References: <1803896180418d.180418d1803896@nyroc.rr.com>
rstepha1@nycap.rr.com writes:
> It seems that the ResultSet is containing the entire selected set of
> data and not using a cursor within the database engine. I have tried
> setting the resultSetType and resultSetConcurrency to TYPE_FORWARD_ONLY
> and CONCUR_READ_ONLY respectively to hopefully force the cursor
> management to be server oriented, without success.
>
> It is possible to work around by increasing the heap size or lowering
> the selection criteria, but ...
>
> How do you get the driver to not retrieve all of the data into the
> ResultSet? Is there a setting either within the JDBC driver, or at the
> database that would determine caching X number of rows returned at a time?
Try this:
myStatement.setFetchSize(43);
Warning: according to the JDBC spec, it's just a "hint", the driver
may still do what it thinks is good.
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: Marc.Herbert@emicnetworks.com
Subject: Re: OutOfMemoryError
In-Reply-To: <877je4o99z.fsf@meije.emic.fr>
References: <1803896180418d.180418d1803896@nyroc.rr.com> <877je4o99z.fsf@meije.emic.fr>
* 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