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 D3D99D7A33 for ; Mon, 29 Aug 2005 11:09:25 -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 83127-10 for ; Mon, 29 Aug 2005 14:09:22 +0000 (GMT) Received: from ms-smtp-02.nyroc.rr.com (ms-smtp-02.nyroc.rr.com [24.24.2.56]) by svr1.postgresql.org (Postfix) with ESMTP id 8EE44D79A5 for ; Mon, 29 Aug 2005 11:09:18 -0300 (ADT) Received: from ms-mss-02 ([10.10.4.8]) by ms-smtp-02.nyroc.rr.com (8.12.10/8.12.10) with ESMTP id j7TE9JIU000154 for ; Mon, 29 Aug 2005 10:09:20 -0400 (EDT) Received: from nyroc.rr.com (localhost [127.0.0.1]) by ms-mss-02.nyroc.rr.com (iPlanet Messaging Server 5.2 HotFix 2.04 (built Feb 8 2005)) with ESMTP id <0ILZ00HDMLZJSO@ms-mss-02.nyroc.rr.com> for pgsql-jdbc@postgresql.org; Mon, 29 Aug 2005 10:09:19 -0400 (EDT) Received: from [10.10.6.25] (Forwarded-For: [24.97.145.178]) by ms-mss-02.nyroc.rr.com (mshttpd); Mon, 29 Aug 2005 10:09:19 -0400 Date: Mon, 29 Aug 2005 10:09:19 -0400 From: rstepha1@nycap.rr.com Subject: OutOfMemoryError To: pgsql-jdbc@postgresql.org Message-id: <1803896180418d.180418d1803896@nyroc.rr.com> MIME-version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 HotFix 2.04 (built Feb 8 2005) Content-type: text/plain; charset=us-ascii Content-language: en Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: en X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.044 required=5 tests=[DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_WHOIS=0.492, NO_REAL_NAME=0.178] X-Spam-Level: * X-Archive-Number: 200508/197 X-Sequence-Number: 13766 I am having a problem with performing large selects and getting a java.lang.OutOfMemoryError. Database: 8.0.1 JVM: 1.5 Driver: 8.0-311 JDBC 3 Using a simple select: SELECT col1, col2 FROM schm.tab1 WHERE col2 BETWEEN 30000 AND 31000 It seems that the ResultSet is containing the entire selected set of data and not using a cursor within the database engine. I have tried setting the resultSetType and resultSetConcurrency to TYPE_FORWARD_ONLY and CONCUR_READ_ONLY respectively to hopefully force the cursor management to be server oriented, without success. It is possible to work around by increasing the heap size or lowering the selection criteria, but ... How do you get the driver to not retrieve all of the data into the ResultSet? Is there a setting either within the JDBC driver, or at the database that would determine caching X number of rows returned at a time? Richard