Re: DELETE with JOIN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: felix(at)crowfix(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: DELETE with JOIN
Date: 2008-08-07 19:58:51
Message-ID: 26509.1218139131@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

felix(at)crowfix(dot)com writes:
> I have tried to do this before and always found a way, usually

> DELETE FROM a WHERE a.b_id IN (SELECT id FROM b WHERE second_id = ?)

> but I have too many rows, millions, in the IN crowd, ha ha, and it
> barfs.

Define "barfs". That seems like the standard way to do it, and it
should work.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Frank Bax 2008-08-07 20:01:29 Re: DELETE with JOIN
Previous Message felix 2008-08-07 19:12:07 Re: DELETE with JOIN