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 18:37:57
Message-ID: 20080807183757.GB31356@crowfix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Aug 07, 2008 at 10:40:22AM -0700, Steve Midgley wrote:

> Have you tried something where you read in all those "IN id's" and then
> group them into blocks (of say 1,000 or 10,000 or whatever number works
> best)? Then execute:
>
> DELETE FROM a WHERE a.b_id in ([static_list_of_ids])

It may come to something like that, but I figure handing over hubdreds
of static IDs is probably worse for the planner than an expression,
and it's ugly as sin :-)

I tried using "%" for a mod function, but that seems to not be a
universally recognized operator.

--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
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 Frank Bax 2008-08-07 19:00:35 Re: DELETE with JOIN
Previous Message felix 2008-08-07 18:35:37 Re: DELETE with JOIN