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 18864DA9A4 for ; Fri, 21 Oct 2005 18:02:42 -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 91117-05 for ; Fri, 21 Oct 2005 21:02:38 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by svr1.postgresql.org (Postfix) with ESMTP id DEE89DA962 for ; Fri, 21 Oct 2005 18:02:39 -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 1ET429-0002YH-UX; Sat, 22 Oct 2005 10:02:37 +1300 Message-ID: <4359576D.8050304@opencloud.com> Date: Sat, 22 Oct 2005 10:02:37 +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: In-Reply-To: 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/101 X-Sequence-Number: 14032 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? -O