pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin <kev@drule.org>
To: arnaulist@andromeiberica.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Advise about how to delete entries
Date: Tue, 06 Sep 2005 05:05:25 -0600
Message-ID: <431D77F5.4070307@drule.org> (raw)
In-Reply-To: <431C0F48.5050809@andromeiberica.com>
References: <43183AC9.1060704@andromeiberica.com>
	<op.swhh87t5th1vuj@localhost>
	<431C0F48.5050809@andromeiberica.com>

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




view thread (6+ messages)  latest in thread

Message-ID: <431D77F5.4070307@drule.org>
Permalink:  ../431D77F5.4070307@drule.org/
Also on:    postgresql.org/message-id/431D77F5.4070307@drule.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kev@drule.org, arnaulist@andromeiberica.com
  Subject: Re: Advise about how to delete entries
  In-Reply-To: <431D77F5.4070307@drule.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox