X-Original-To: pgsql-sql@postgresql.org Received: from utahisp.com (utahisp.com [66.239.12.3]) by postgresql.org (Postfix) with ESMTP id 6F7844762DB for ; Wed, 5 Mar 2003 10:56:24 -0500 (EST) Received: from chad [63.230.8.76] by utahisp.com (SMTPD32-7.14) id ADB45CA10252; Wed, 05 Mar 2003 08:54:28 -0700 Message-ID: <0b6301c2e32f$44fcc720$32021aac@chad> From: "Chad Thompson" To: , References: Subject: Re: DELETE FROM A BLACK LIST Date: Wed, 5 Mar 2003 08:52:46 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Declude-Sender: chad@weblinkservices.com [63.230.8.76] X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam. X-Archive-Number: 200303/161 X-Sequence-Number: 12201 You could use where exists. delete from t1 where exists (select id from blacklist as b where b.id = t1.id) HTH Chad ----- Original Message ----- From: To: Sent: Wednesday, March 05, 2003 3:45 AM Subject: [SQL] DELETE FROM A BLACK LIST > > Hi all, > I have a Blacklist table containing about 1000 ID to delete from another > table (T1 about 1440294 records) > If i use the SQL > > DELETE FROM T1 WHERE T1.ID IN (SELECT BLACKLIST.ID FROM BLACKLIST) > > the operation is very slow . > > There is a faster way to do the same operation?? > > Thanks > Luca > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >