Question on Insert / Update

Поиск
Список
Период
Сортировка
От Alex
Тема Question on Insert / Update
Дата
Msg-id 43720B9A.10907@meerkatsoft.com
обсуждение исходный текст
Ответы Re: Question on Insert / Update  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: Question on Insert / Update  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: Question on Insert / Update  (Sean Davis <sdavis2@mail.nih.gov>)
Список 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 по дате отправления:

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: How to obtain the code af a function ?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: How to obtain the code af a function ?