Re: Insert performance (OT?)

Поиск
Список
Период
Сортировка
Искать
От
Manfred Koizar
Тема
Re: Insert performance (OT?)
Дата
Msg-id
cs67g11p5k1pfkf6kcuvpnjubmmeutcni2@4ax.com
Ответ на
Список
Дерево обсуждения
Insert performance (OT?) Yves Vindevogel <yves.vindevogel@implements.be>
Re: Insert performance (OT?) Yves Vindevogel <yves.vindevogel@implements.be>
Re: Insert performance (OT?) Richard Huxton <dev@archonet.com>
On Tue, 19 Jul 2005 11:51:51 +0100, Richard Huxton 
wrote:
>You could get away with one query if you converted them to left-joins:
>INSERT INTO ...
>SELECT * FROM upload LEFT JOIN ... WHERE f3 IS NULL
>UNION
>SELECT * FROM upload LEFT JOIN ... WHERE f4 IS NULL

For the archives:  This won't work.  Each of the two SELECTs
eliminates rows violating one of the two constraints but includes rows
violating the other constraint.  After the UNION you are back to
violating both constraints :-(

Servus
 Manfred

В списке pgsql-performance по дате отправления
От: Josh Berkus
Дата:
От: John A Meinel
Дата:
Сообщение: Re: Insert performance (OT?)
FAQ