Skip site navigation (1) Skip section navigation (2)

Re: Queries with large ResultSets

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Andrea Aime <andrea(dot)aime(at)aliceposta(dot)it>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kris Jurka <books(at)ejurka(dot)com>,Jack Orenstein <jao(at)geophile(dot)com>,"pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Queries with large ResultSets
Date: 2004-05-20 20:03:33
Message-ID: 1085083413.1585.3.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
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 

On Thu, 2004-05-20 at 15:27, Andrea Aime wrote:
> Alle 20:44, giovedì 20 maggio 2004, Tom Lane ha scritto:
> > Andrea Aime <andrea(dot)aime(at)aliceposta(dot)it> 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?
> !DSPAM:40ad082858103601796679!
Dave Cramer
519 939 0336
ICQ # 14675561

In response to


pgsql-jdbc by date

Next:From: Andrea AimeDate: 2004-05-20 20:56:41
Subject: Re: Queries with large ResultSets
Previous:From: Andrea AimeDate: 2004-05-20 19:27:11
Subject: Re: Queries with large ResultSets

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group