From: Bricklen Anderson <BAnderson@PresiNET.com>
To: Dennis Bjorklund <db@zigo.dhs.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: ETL optimization
Date: Mon, 27 Jun 2005 11:15:06 -0700
Message-ID: <42C0422A.7020408@PresiNET.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0506240624350.4501-100000@zigo.dhs.org>
References: <Pine.LNX.4.44.0506240624350.4501-100000@zigo.dhs.org>
Dennis Bjorklund wrote:
> On Thu, 23 Jun 2005, Bricklen Anderson wrote:
>
>
>>iii. UNIQUE constraint on table "t1". This didn't seem to perform too
>>badly with fewer rows (preliminary tests), but as you'd expect, on error
>>the whole transaction would roll back. Is it possible to skip a row if
>>it causes an error, as opposed to aborting the transaction altogether?
>
>
> You don't need to roll back the whole transaction if you use savepoints or
> the exception features in pl/pgsql
>
> Take a look at this example:
>
> http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE
>
Hmmm... forgot about savepoints. That's an interesting idea that I'll have to
check out. I earlier mentioned that I was going to test the delete + insert
version, and it works pretty well. I got it down to about 3 minutes using that
method. I'll test the savepoint and the exception version that you listed as well.
Thanks!
--
_______________________________
This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations. Any distribution, use or
copying of this e-mail or the information it contains by other than an
intended recipient is unauthorized. If you received this e-mail in
error, please advise me (by return e-mail or otherwise) immediately.
_______________________________
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: BAnderson@PresiNET.com, db@zigo.dhs.org
Subject: Re: ETL optimization
In-Reply-To: <42C0422A.7020408@PresiNET.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox