X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id 6DD68CCA80 for ; Thu, 17 Jul 2003 17:00:55 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 74021-05 for ; Thu, 17 Jul 2003 17:01:13 +0000 (GMT) Received: from exchange.hq.openratings.com (unknown [141.149.165.226]) by svr1.postgresql.org (Postfix) with ESMTP id A3BD9CCA7B for ; Thu, 17 Jul 2003 14:00:42 -0300 (ADT) Received: from openratings.com (cancun.hq.openratings.com [10.0.0.225]) by exchange.hq.openratings.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 38QM4VA3; Thu, 17 Jul 2003 13:01:12 -0400 Message-ID: <3F16D677.3010300@openratings.com> Date: Thu, 17 Jul 2003 13:01:43 -0400 From: Dmitry Tkach User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rich Cullingford Cc: pgsql-jdbc@postgresql.org Subject: Re: setFetchSize() References: <3F16D2C9.3010808@sysd.com> In-Reply-To: <3F16D2C9.3010808@sysd.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/92 X-Sequence-Number: 7476 Rich Cullingford wrote: > All, > Will this function be implemented in Release 7.4? I have several arge > tables that run Java out of memory when I attempt to load them through > JDBC. Any workarounds arppreciated... I was using cursors for a while as a workaround... Something like this: c.setAutocommit (false); Statement s = c.createStatement (); s.execute ("declare foo cursor for select * from bar"); while (true) { ResultSet rs = s.executeQuery ("fetch 10 from foo"); int count = 0; while (rs.next ()) { count++; doStuffWithThisRow (rs); } if (count < 10) //The whole cursor contents has been processed break; } I hope, it helps... Dima