X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id 7AAA7CCAB6 for ; Fri, 18 Jul 2003 02:54:00 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 52478-07 for ; Fri, 18 Jul 2003 02:54:25 +0000 (GMT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 569C4CADB4 for ; Thu, 17 Jul 2003 23:53:58 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h6I2sKQ3016970; Thu, 17 Jul 2003 22:54:22 -0400 (EDT) To: Dave@micro-automation.net Cc: "pgsql-jdbc@postgresql.org" Subject: Re: setFetchSize() In-reply-to: <1058476359.1574.3.camel@localhost.localdomain> 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> Comments: In-reply-to Dave Cramer message dated "17 Jul 2003 17:12:39 -0400" Date: Thu, 17 Jul 2003 22:54:20 -0400 Message-ID: <16969.1058496860@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/115 X-Sequence-Number: 7499 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