pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: Steven Rosenstein <srosenst@us.ibm.com>
Subject: Re: Are JOINs allowed with DELETE FROM
Date: Mon, 07 Feb 2005 18:22:50 +0100
Message-ID: <4207A3EA.5020902@bigfoot.com> (raw)
In-Reply-To: <OF8B3991BA.5AD3582E-ON85256FA0.0065EFA7-85256FA0.006B6A96@us.ibm.com>
References: <20050206175029.GA89095@winnie.fuhr.org>
	<OF8B3991BA.5AD3582E-ON85256FA0.0065EFA7-85256FA0.006B6A96@us.ibm.com>

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












view thread (8+ messages)

Message-ID: <4207A3EA.5020902@bigfoot.com>
Permalink:  ../4207A3EA.5020902@bigfoot.com/
Also on:    postgresql.org/message-id/4207A3EA.5020902@bigfoot.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mendola@bigfoot.com, srosenst@us.ibm.com
  Subject: Re: Are JOINs allowed with DELETE FROM
  In-Reply-To: <4207A3EA.5020902@bigfoot.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox