Re: Advise about how to delete entries

From: Kevin <kev(at)drule(dot)org>
To: arnaulist(at)andromeiberica(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Advise about how to delete entries
Date: 2005-09-06 11:05:25
Message-ID: 431D77F5.4070307@drule.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Arnau wrote:

> Hi all,
>
> >
> > COPY FROM a file with all the ID's to delete, into a temporary
> table, and do a joined delete to your main table (thus, only one query).
>
>
> I already did this, but I don't have idea about how to do this join,
> could you give me a hint ;-) ?
>
> Thank you very much

maybe something like this:

DELETE FROM statistics_sasme s
LEFT JOIN temp_table t ON (s.statistic_id = t.statistic_id)
WHERE t.statistic_id IS NOT NULL

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Chris Browne 2005-09-06 12:48:56 Re: When to do a vacuum for highly active table
Previous Message J. Andrew Rogers 2005-09-06 07:03:29 Re: Postgresql Hardware - Recommendations