From brianghuber@yahoo.com Sun Jun 6 05:36:06 2004 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 4323ED1B34C for ; Sun, 6 Jun 2004 02:36:06 -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 42605-03 for ; Sun, 6 Jun 2004 05:35:56 +0000 (GMT) Received: from smtp814.mail.sc5.yahoo.com (smtp814.mail.sc5.yahoo.com [66.163.170.84]) by svr1.postgresql.org (Postfix) with SMTP id 63D65D1B189 for ; Sun, 6 Jun 2004 02:35:24 -0300 (ADT) Received: from unknown (HELO bghthinkpad) (bghcm@sbcglobal.net@68.92.149.197 with login) by smtp814.mail.sc5.yahoo.com with SMTP; 6 Jun 2004 05:35:14 -0000 Message-ID: <002e01c44b87$fd7bbe70$6400a8c0@bghthinkpad> Reply-To: "Brian G. Huber" From: "Brian G. Huber" To: Subject: Forcing use of cursor for large result sets Date: Sun, 6 Jun 2004 00:34:51 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002B_01C44B5E.14362BC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.0 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_MESSAGE, RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: * X-Archive-Number: 200406/24 X-Sequence-Number: 10226 This is a multi-part message in MIME format. ------=_NextPart_000_002B_01C44B5E.14362BC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello all -=20 I am attempting to force the use of a cursor for a resultset. I have tried= both forward-only and scrollable statements and am setting fetch size to 1= 00 with a call to setFechSize(100) on the statement. However, I do not thi= nk a cursor is being used because the entire result set is trying to cache,= resulting in an outofMemoryError. I am using pg74.213.jdbc3.jar with 7.4.= 2. Any advice appreciated... Thanks- BGH ------=_NextPart_000_002B_01C44B5E.14362BC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello all -
 
I am attempting to force the use of a curs= or for a=20 resultset.  I have tried both forward-only and scrollable statements a= nd am=20 setting fetch size to 100 with a call to setFechSize(100) on the=20 statement.  However, I do not think a cursor is being used because the= =20 entire result set is trying to cache, resulting in an outofMemoryError.&nbs= p; I=20 am using pg74.213.jdbc3.jar with 7.4.2.
 
Any advice appreciated... Thanks-
BGH
------=_NextPart_000_002B_01C44B5E.14362BC0-- From books@ejurka.com Mon Jun 7 08:04:41 2004 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 E1A7AD1B1AC for ; Mon, 7 Jun 2004 05:04:41 -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 23600-08 for ; Mon, 7 Jun 2004 08:04:38 +0000 (GMT) Received: from mail63.csoft.net (unknown [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 9BADDD1B18C for ; Mon, 7 Jun 2004 05:04:36 -0300 (ADT) Received: (qmail 16628 invoked by uid 1112); 7 Jun 2004 07:50:21 -0000 Date: Mon, 7 Jun 2004 02:50:21 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: "Brian G. Huber" Cc: pgsql-jdbc@postgresql.org Subject: Re: Forcing use of cursor for large result sets In-Reply-To: <002e01c44b87$fd7bbe70$6400a8c0@bghthinkpad> Message-ID: References: <002e01c44b87$fd7bbe70$6400a8c0@bghthinkpad> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/32 X-Sequence-Number: 10234 On Sun, 6 Jun 2004, Brian G. Huber wrote: > Hello all - > > I am attempting to force the use of a cursor for a resultset. I have > tried both forward-only and scrollable statements and am setting fetch > size to 100 with a call to setFechSize(100) on the statement. However, > I do not think a cursor is being used because the entire result set is > trying to cache, resulting in an outofMemoryError. I am using > pg74.213.jdbc3.jar with 7.4.2. > Two additional restrictions in the current driver are that you must be in a transaction by setting setAutoCommit(false) and that the query in question be a single sql statement. The single statement test is a bit naive, so a semi-colon in the query string will make it think it is a multi-statement query. Kris Jurka