Re: Slow Bulk Delete

From: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow Bulk Delete
Date: 2010-05-17 12:35:35
Message-ID: AANLkTilWtM3tFBqxll5h_V0YWnB4sxgPyxb1bauwxk_2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, May 17, 2010 at 7:28 AM, A. Kretschmer
<andreas(dot)kretschmer(at)schollglas(dot)com> wrote:
> In response to Jon Nelson :
>> On Mon, May 17, 2010 at 5:10 AM, Pierre C <lists(at)peufeu(dot)com> wrote:
>> > - or use a JOIN delete with a virtual VALUES table
>> > - or fill a temp table with ids and use a JOIN DELETE
>>
>> What is a virtual VALUES table? Can you give me an example of using a
>> virtual table with selects, joins, and also deletes?
>
> Something like this:
...

delete from foo using (values (1),(2) ) as bla where foo.c1=bla.column1;
...

Aha! Cool. That's not quite what I envisioned when you said virtual
table, but it surely clarifies things.
Thanks!

--
Jon

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Carlo Stonebanks 2010-05-18 22:28:25 Does FILTER in SEQSCAN short-circuit AND?
Previous Message Grzegorz Jaśkiewicz 2010-05-17 12:33:09 Re: Slow Bulk Delete