X-Original-To: pgsql-sql@postgresql.org Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id 5D3C3476670 for ; Wed, 5 Mar 2003 06:14:17 -0500 (EST) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50] (may be forged)) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h25FLYIs004616; Wed, 5 Mar 2003 13:21:34 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h25FLYYp004612; Wed, 5 Mar 2003 13:21:34 -0200 Date: Wed, 5 Mar 2003 13:21:34 -0200 (GMT+2) From: Achilleus Mantzios To: luca.scaramella@recom.it Cc: pgsql-sql@postgresql.org Subject: Re: DELETE FROM A BLACK LIST In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200303/146 X-Sequence-Number: 12186 On Wed, 5 Mar 2003 luca.scaramella@recom.it wrote: > > 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?? use EXISTS > > Thanks > Luca > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr