X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8FEEDD8243 for ; Fri, 21 Oct 2005 18:33:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01301-04 for ; Fri, 21 Oct 2005 21:33:52 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by svr1.postgresql.org (Postfix) with ESMTP id 8D9D7DA9CF for ; Fri, 21 Oct 2005 18:33:52 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1ET4WQ-0002oj-IY; Sat, 22 Oct 2005 10:33:54 +1300 Message-ID: <43595EC1.90800@opencloud.com> Date: Sat, 22 Oct 2005 10:33:53 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051009) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Geert Bevin Cc: pgsql-jdbc@postgresql.org Subject: Re: Resultset holdability References: <4359576D.8050304@opencloud.com> In-Reply-To: <4359576D.8050304@opencloud.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200510/103 X-Sequence-Number: 14034 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? > > > What driver version are you using? > What server version are you using? > Have you turned autocommit off? One more: Is the statement/resultset TYPE_FORWARD_ONLY? -O