Re: Are JOINs allowed with DELETE FROM - Mailing list pgsql-performance

From Gaetano Mendola
Subject Re: Are JOINs allowed with DELETE FROM
Date
Msg-id 4207A3EA.5020902@bigfoot.com
Whole thread Raw
In response to Re: Are JOINs allowed with DELETE FROM  (Steven Rosenstein <srosenst@us.ibm.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Retry: Is this possible / slow performance?
Next
From: PFC
Date:
Subject: Re: Retry: Is this possible / slow performance?