X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7CD4C53860 for ; Thu, 14 Apr 2005 17:50:59 -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 29285-05 for ; Thu, 14 Apr 2005 20:50:48 +0000 (GMT) Received: from cuaima.ica.luz.ve (cuaima.ica.luz.ve [150.185.222.161]) by svr1.postgresql.org (Postfix) with ESMTP id 7CEFE53F8D for ; Thu, 14 Apr 2005 17:50:44 -0300 (ADT) Received: from tragavenado.ica.luz.ve (tragavenado.ica.luz.ve [10.2.208.202]) by cuaima.ica.luz.ve (Postfix) with ESMTP id 1C61D65392 for ; Thu, 14 Apr 2005 16:50:22 -0400 (VET) From: Nelson =?iso-8859-1?q?Arap=E9?= Organization: ICA-LUZ To: pgsql-jdbc@postgresql.org Subject: Re: process large tables Date: Thu, 14 Apr 2005 16:50:21 -0400 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200504141650.21673.narape@ica.luz.ve> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.025 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/86 X-Sequence-Number: 12693 =46rom the documentation=20 (http://jdbc.postgresql.org/documentation/80/query.html#query-with-cursor) "By default the driver collects all the results for the query at once. This= =20 can be inconvenient for large data sets so the JDBC driver provides a means= =20 of basing a ResultSet on a database cursor and only fetching a small number= =20 of rows.=20 =2E.." With a cursor you fetch rows by pieces. It is well explained in the=20 documentation. Bye Nelson Arap=E9 El Jue 14 Abr 2005 16:37, Kristina Magwood escribi=F3: > Hi, > I am trying to process a large table. Unfortunately, using select * from > table gives me a ResultSet that is too large. > The java runs out of memory even if I boost the vm memory. > Is there any way I can programmatically (in java) retrieve say 10,000 > records at a time without knowing anything specific about the table? Then, > when I am done with those records, retrieve the next 10,000, etc? > > Thank you in advance for any help you can spare. > Kristina