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 912F7CCD4A for ; Fri, 18 Jul 2003 15:20:14 +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 53533-02 for ; Fri, 18 Jul 2003 15:20:47 +0000 (GMT) Received: from exchange.hq.openratings.com (unknown [141.149.165.226]) by svr1.postgresql.org (Postfix) with ESMTP id 306A7CCD42 for ; Fri, 18 Jul 2003 12:20:13 -0300 (ADT) Received: from openratings.com (cancun.hq.openratings.com [10.0.0.225]) by exchange.hq.openratings.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 38QM48B5; Fri, 18 Jul 2003 11:20:45 -0400 Message-ID: <3F181067.6000606@openratings.com> Date: Fri, 18 Jul 2003 11:21:11 -0400 From: Dmitry Tkach User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Dave@micro-automation.net, "pgsql-jdbc@postgresql.org" , bechtel@ipcon.de Subject: Re: setFetchSize() 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> In-Reply-To: <16969.1058496860@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/130 X-Sequence-Number: 7514 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. > > Aha! That seems to explain those memory problems the other guy (Patric, I think) was complaining about earlier... Dima