X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AAB32D1B1BD for ; Thu, 20 May 2004 17:03:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98391-05 for ; Thu, 20 May 2004 17:03:40 -0300 (ADT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id AE79AD1B172 for ; Thu, 20 May 2004 17:03:37 -0300 (ADT) Received: (qmail 11041 invoked from network); 20 May 2004 20:03:34 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 20 May 2004 20:03:34 -0000 Subject: Re: Queries with large ResultSets From: Dave Cramer Reply-To: pg@fastcrypt.com To: Andrea Aime Cc: Tom Lane , Kris Jurka , Jack Orenstein , "pgsql-jdbc@postgresql.org" In-Reply-To: <200405202127.11956.andrea.aime@aliceposta.it> References: <40ABD19C.8080109@geophile.com> <200405202022.37646.andrea.aime@aliceposta.it> <3723.1085078664@sss.pgh.pa.us> <200405202127.11956.andrea.aime@aliceposta.it> Content-Type: text/plain; charset=ISO-8859-1 Organization: Cramer Consulting Message-Id: <1085083413.1585.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 20 May 2004 16:03:33 -0400 Content-Transfer-Encoding: 8bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/129 X-Sequence-Number: 10139 You can use a holdable cursor, and get a cursor outside of a transaction, but beware, postgres has to store this somewhere, and it's not update-able Dave On Thu, 2004-05-20 at 15:27, Andrea Aime wrote: > Alle 20:44, giovedì 20 maggio 2004, Tom Lane ha scritto: > > Andrea Aime writes: > > > Ugh... those limitation are really frightening, this means we cannot > > > fetch big quantities of data outside of a transaction... > > > > You were expecting something different? Postgres does not do *anything* > > outside of a transaction. > > Every other database I have some experience on (sql server, sapdb) allows you > to use cursors regardless of the transaction. If you are working with a > database in autocommit mode that doesn't mean that you don't need to load > huge quantities of data... on the contrary, I would expect that it would be > more costly to load the huge amount of data inside of a transaction because > of transaction isolation. > Anyway, that's not the matter, the real problem is that our generic jdbc code > won't work properly with postgres because of this "feature" thus we will have > to subclass everything that deals with the database in order to get the > correct behaviour. > > If I am in autocommit = false mode, I will have to call connection.commit() > after every write command to the database... isolation wise, to simulate a > true autocommit, will I have to call connection.commit() also after reads if > I raise the isolation level above READ_COMMITED? > > Best regards > Andrea Aime > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > > > !DSPAM:40ad082858103601796679! > > -- Dave Cramer 519 939 0336 ICQ # 14675561