X-Original-To: pgsql-sql@postgresql.org Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 439B2476262 for ; Wed, 5 Mar 2003 09:27:37 -0500 (EST) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Wed Mar 05 15:27:40 2003 +0100 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id PAA19733; Wed, 5 Mar 2003 15:27:40 +0100 (MET) Message-ID: <3E66095B.247A3D1B@rodos.fzk.de> Date: Wed, 05 Mar 2003 15:27:39 +0100 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: luca.scaramella@recom.it Subject: Re: DELETE FROM A BLACK LIST Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Archive-Number: 200303/154 X-Sequence-Number: 12194 > > 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?? > Try DELETE FROM T1 WHERE T1.ID = BLACKLIST.ID It really works. Regards, Christoph