Re: Advise about how to delete entries - Mailing list pgsql-performance

From Kevin
Subject Re: Advise about how to delete entries
Date
Msg-id 431D77F5.4070307@drule.org
Whole thread Raw
In response to Re: Advise about how to delete entries  (Arnau <arnaulist@andromeiberica.com>)
Responses Re: Advise about how to delete entries
List 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


pgsql-performance by date:

Previous
From: "J. Andrew Rogers"
Date:
Subject: Re: Postgresql Hardware - Recommendations
Next
From: "Merlin Moncure"
Date:
Subject: Re: Improving performance of a query