From: | Geert Bevin <gbevin(at)uwyn(dot)com> |
---|---|
To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Resultset holdability |
Date: | 2005-10-21 21:33:08 |
Message-ID: | 186ADB46-C466-4163-8596-B3BB9EB34D35@uwyn.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 21-okt-05, at 23:02, Oliver Jowett wrote:
> Geert Bevin wrote:
>
>
>> I have a resultset that has many rows with bytea data.
>> It looks like me that when I iterate through the rows, the
>> previous rows are only garbage collectable when the resultset is
>> closed, even if I setup the statement like this:
>> statement.setFetchDirection(ResultSet.FETCH_FORWARD);
>> statement.setFetchSize(1);
>> Since it's bytea data, this fills up the memory very quickly. Any
>> thoughts on how to reduce this memory overhead and have the
>> resultset discard any previously fetched data?
Btw, it definitely is the resultset, since instead of using it to
iterate through the results I tried doing it by running a prepared
statement for each row and obtaining the results like this. The
frontend logic remained the same and I have no memory problems
anymore, except that there are an awful lot of queries now :-(
> What driver version are you using?
I tried with both 8.0-313 JDBC 3 and 8.1dev-402 JDBC 3
> What server version are you using?
8.0.3
> Have you turned autocommit off?
No
--
Geert Bevin Uwyn bvba
"Use what you need" Avenue de Scailmont 34
http://www.uwyn.com 7170 Manage, Belgium
gbevin[remove] at uwyn dot com Tel +32 64 84 80 03
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2005-10-21 21:33:53 | Re: Resultset holdability |
Previous Message | Oliver Jowett | 2005-10-21 21:02:37 | Re: Resultset holdability |