Re: DELETE with JOIN

From: felix(at)crowfix(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: DELETE with JOIN
Date: 2008-08-07 21:39:27
Message-ID: 20080807213927.GB11185@crowfix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Aug 07, 2008 at 03:58:51PM -0400, Tom Lane wrote:
> 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.

In this case, the first database I tried was Oracle, and it complained
of too much transactional data; I forget the exact wording now. It
worked on some cases, but others with "too much" data died with the
complaint after thinking about it for a minute or so. Since the test
data will only grow in size, I was hoping for some other way.

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch: scarecrow repairman & rocket surgeon / felix(at)crowfix(dot)com
GPG = E987 4493 C860 246C 3B1E 6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christophe 2008-08-07 21:42:10 Re: DELETE with JOIN
Previous Message Yura Gal 2008-08-07 21:37:41 Re: enumerate groups given a certain value