Re: Cursors and Transactions, why?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: wespvp(at)syntegra(dot)com
Cc: Jan Wieck <JanWieck(at)yahoo(dot)com>, Eric Ridge <ebr(at)tcdi(dot)com>, Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Cursors and Transactions, why?
Date: 2004-04-06 20:55:58
Message-ID: 1642.1081284958@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<wespvp(at)syntegra(dot)com> writes:
> Is this hang on COMMIT when using WITH HOLD to be expected?

Yes. WITH HOLD is not magic, it just makes a materialized copy of the
SELECT result. If you're talking about a multi-million-row result,
it's gonna take awhile.

> The kludge solution I implemented was to write out all the data I
> needed from table A to a file, then read that file and update table B.

In theory at least, that should not be any faster than a WITH HOLD
cursor, since you're effectively replicating the same functionality
outside the database ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob.Henkel 2004-04-06 21:16:49 Re: Large DB
Previous Message Tom Lane 2004-04-06 20:44:22 Re: PERFORM statement inside procedure