Re: Are JOINs allowed with DELETE FROM

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: Are JOINs allowed with DELETE FROM
Дата
Msg-id 4207A3EA.5020902@bigfoot.com
обсуждение исходный текст
Ответ на Re: Are JOINs allowed with DELETE FROM  (Steven Rosenstein <srosenst@us.ibm.com>)
Список pgsql-performance
Steven Rosenstein wrote:
 >
 >
 >
 > Hi Michael,
 >
 > Thank you for the link to the documentation page.  I forgot to mention that
 > we're still using version 7.3.  When I checked the 7.3 documentation for
 > DELETE, there was no mention of being able to use fields from different
 > tables in a WHERE clause.  This feature must have been added in a
 > subsequent release of PostgreSQL.
 >
 > Gaetano & John:  I *did* try your suggestion.  However, there were so many
 > summary ID's returned (9810 to be exact) that the DELETE seemed to be
 > taking forever.

7.3 is affected by bad performances if you use IN.
Transform the IN in an  EXIST construct.

If it'is an option for you upgrade you DB engine.



Regards
Gaetano Mendola










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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Retry: Is this possible / slow performance?
Следующее
От: PFC
Дата:
Сообщение: Re: Retry: Is this possible / slow performance?