Question on Insert / Update - Mailing list pgsql-general

From Alex
Subject Question on Insert / Update
Date
Msg-id 43720B9A.10907@meerkatsoft.com
Whole thread Raw
Responses Re: Question on Insert / Update
Re: Question on Insert / Update
Re: Question on Insert / Update
List pgsql-general
Hi,
have just a general question...

I have a table of 10M records, unique key on 5 fields.
I need to update/insert 200k records in one go.

I could do a select to check for existence and then either insert or update.
Or simply insert, check on the error code an update if required.

The 2nd seems to be to logical choice, but will it actually be faster
and moreover is that the right way to do it?

Thanks
Alex


pgsql-general by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: How to obtain the code af a function ?
Next
From: Richard Huxton
Date:
Subject: Re: How to obtain the code af a function ?