X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id E5090CC0E3 for ; Mon, 14 Jul 2003 17:07:45 +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 36254-02 for ; Mon, 14 Jul 2003 17:08:10 +0000 (GMT) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by svr1.postgresql.org (Postfix) with ESMTP id CCEF3CC084 for ; Mon, 14 Jul 2003 14:07:43 -0300 (ADT) Received: from fwd07.aul.t-online.de by mailout02.sul.t-online.com with smtp id 19c6nz-0004ND-02; Mon, 14 Jul 2003 19:08:03 +0200 Received: from router.azrael.de (GQbfJaZvZeXPwbvwcE0n1uDOYAa86QpAF2xohICbE2QaGI4o9eFVUn@[80.141.249.129]) by fmrl07.sul.t-online.com with esmtp id 19c6nr-0g0MCW0; Mon, 14 Jul 2003 19:07:55 +0200 Received: from azrael.azrael.de (azrael.azrael.de [192.168.202.18]) by router.azrael.de (8.11.4/8.11.4) with ESMTP id h6EH7Qt20710; Mon, 14 Jul 2003 19:07:42 +0200 Date: Mon, 14 Jul 2003 19:07:44 +0200 From: Evil Azrael X-Mailer: The Bat! (v1.62r) Personal X-Priority: 3 (Normal) Message-ID: <71226588.20030714190744@evilazrael.de> To: Rich Cullingford Cc: pgsql-performance@postgresql.org Subject: Re: Java Out-of-memory errors on attempts to read tables with millions of rows In-Reply-To: <3F12DFFE.3090207@sysd.com> References: <3F12DFFE.3090207@sysd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Seen: false X-ID: GQbfJaZvZeXPwbvwcE0n1uDOYAa86QpAF2xohICbE2QaGI4o9eFVUn@t-dialin.net X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=IN_REP_TO, RCVD_IN_NJABL, REFERENCES, X_NJABL_DIALUP X-Spam-Level: X-Archive-Number: 200307/223 X-Sequence-Number: 2516 I think you want to use a Cursor for browsing the data. Christoph Nelles Am Montag, 14. Juli 2003 um 18:53 schrieben Sie: RC> Greetings, RC> We have several tables (in a PG 7.3.3 database on RH Linux 7.3) with 2M+ RC> rows (each row 300-400 bytes in length) that we SELECT into a JDBC RC> ResultSet for display to the user. We expected that the driver would not RC> actually transmit data from the database until the application began RC> issuing getXXX() calls. (IIRC, this is the way the Oracle driver works, RC> and we had created a buffering mechanism to use it.) Instead, the driver RC> appears to be attempting to create the whole rowset in Java memory RC> before returning, and the application runs out of memory. (Java has been RC> configured to use up to 1.5G on the machine this occurs on.) RC> Now the SELECT is preceded by a COUNT of the rows that the same query RC> would return, so perhaps that's what's causing the problem. But the RC> question is, is this the way a ResultSet is supposed to work? Are there RC> any configuration options available that modify this behavior? Are there RC> commercial implementations of PG JDBC that don't have this problem? RC> (Shame on me, but I have to ask. :) RC> Any help will be greatly appreciated! RC> Rich Cullingford RC> rculling@sysd.com RC> ---------------------------(end of broadcast)--------------------------- RC> TIP 9: the planner will ignore your desire to choose an index scan if your RC> joining column's datatypes do not match -- Mit freundlichen Grüssen Evil Azrael mailto:evilazrael@evilazrael.de