Re: UPDATE on two large datasets is very slow

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: UPDATE on two large datasets is very slow
Дата
Msg-id 20070404152432.GE22542@svana.org
обсуждение исходный текст
Ответ на Re: UPDATE on two large datasets is very slow  (Tommy Gildseth <tommy@gildseth.com>)
Список pgsql-general
On Wed, Apr 04, 2007 at 11:34:22AM +0200, Tommy Gildseth wrote:
> >For the record, this is what the SQL MERGE command is for... I don't
> >think anyone is working on implementing that though...
> >
> This will possibly provide a solution to this question:
> http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE

Almost. Merge will allow you to combine the INSERT and UPDATE into a
single command. It doesn't avoid the race condition though, so you
still need the exception block and the loop.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: "Froggy / Froggy Corp."
Дата:
Сообщение: Re: Problem with a transaction on dump
Следующее
От: "pobox@verysmall.org"
Дата:
Сообщение: Re: use superuser connection from php