Re: How to insert on duplicate key?

Поиск
Список
Период
Сортировка
От fdu.xiaojf@gmail.com
Тема Re: How to insert on duplicate key?
Дата
Msg-id 47707843.7090402@gmail.com
обсуждение исходный текст
Ответ на Re: How to insert on duplicate key?  (Michael Glaesemann <grzm@seespotcode.net>)
Список pgsql-general
Michael Glaesemann wrote:
>
> On Dec 24, 2007, at 22:03 , fdu.xiaojf@gmail.com wrote:
>
>> I have googled and currently the only way I can find is do query first
>> and then update or insert.
>
> Or alternatively, UPDATE and see if you've affected any rows. If not,
> insert.
>
> Michael Glaesemann
> grzm seespotcode net
>
>
>

Thanks for your quick reply!

Is the update and insert method quick?

I have tried the query and update/insert way, and it was very slow when more
than 1 million records have been inserted. (I have more than 20 million
records to insert.)

Thanks again!

Xiao Jianfeng

В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: How to insert on duplicate key?
Следующее
От: Greg Smith
Дата:
Сообщение: Re: How to insert on duplicate key?