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 12049CCD29 for ; Fri, 18 Jul 2003 14:00:47 +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 08471-09 for ; Fri, 18 Jul 2003 14:01:04 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 3C9E0CCD18 for ; Fri, 18 Jul 2003 11:00:35 -0300 (ADT) Received: (qmail 14085 invoked from network); 18 Jul 2003 12:41:01 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.33?) (64.7.143.116) by net2.micro-automation.com with SMTP; 18 Jul 2003 12:41:01 -0000 Subject: Re: setFetchSize() From: Dave Cramer Reply-To: Dave@micro-automation.net To: Tom Lane Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: <16969.1058496860@sss.pgh.pa.us> References: <3F16D2C9.3010808@sysd.com> <3F16D677.3010300@openratings.com> <20030717140110.52ca5fe2.felipes@ritterdosreis.br> <3F16D9DF.6050900@openratings.com> <20030717141903.2cf411e2.felipes@ritterdosreis.br> <3F16DC24.5020509@openratings.com> <1058476359.1574.3.camel@localhost.localdomain> <16969.1058496860@sss.pgh.pa.us> Content-Type: text/plain Organization: Message-Id: <1058531850.1574.26.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 18 Jul 2003 08:37:30 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/122 X-Sequence-Number: 7506 I stand corrected. Dave On Thu, 2003-07-17 at 22:54, Tom Lane wrote: > Dave Cramer writes: > > This isn't true any more, the backend supports with hold now, so you can > > declare a cursor outside a transaction > > However, if the problem is that the query result is too large to hold in > memory, then a WITH HOLD cursor is a terrible solution. You are simply > moving the problem of coping with the fully-materialized query result > out of the client and into the backend. Admittedly the backend is > probably better able to cope than the client (at least it knows how to > spill rows to disk...), but if you are trying to get good performance > on huge result sets you do not want to use a held cursor, any more than > you want to suck the whole result into client memory. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Dave Cramer