Re: DELETE FROM A BLACK LIST

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Cc: luca(dot)scaramella(at)recom(dot)it
Subject: Re: DELETE FROM A BLACK LIST
Date: 2003-03-05 14:27:39
Message-ID: 3E66095B.247A3D1B@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> 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

Browse pgsql-sql by date

  From Date Subject
Next Message Kim Petersen 2003-03-05 14:31:29 problematic query (for me ;-)
Previous Message Christoph Haller 2003-03-05 14:10:28 Re: SETOF