Re: Are JOINs allowed with DELETE FROM

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Steven Rosenstein <srosenst(at)us(dot)ibm(dot)com>
Subject: Re: Are JOINs allowed with DELETE FROM
Date: 2005-02-07 17:22:50
Message-ID: 4207A3EA.5020902@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message PFC 2005-02-07 18:16:47 Re: Retry: Is this possible / slow performance?
Previous Message Tom Lane 2005-02-07 17:03:56 Re: Retry: Is this possible / slow performance?