Re: delete to slow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ricardo Valença de Assis <valenca(at)campusvirtual(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: delete to slow
Date: 2005-04-06 17:27:42
Message-ID: 28471.1112808462@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

=?iso-8859-1?Q?Ricardo_Valen=E7a_de_Assis?= <valenca(at)campusvirtual(dot)br> writes:
> DELETE FROM table1 WHERE column1 IN (SELECT column2 FROM table2);

What PG version is this, and what does EXPLAIN say about that query?

> Is there a way to use DELETE with INNER JOIN in PostGreSQL?

You could do "DELETE FROM table1 WHERE column1 = table2.column2" but
that is not necessarily better.

regards, tom lane

In response to

  • delete to slow at 2005-04-06 16:45:13 from Ricardo Valença de Assis

Browse pgsql-admin by date

  From Date Subject
Next Message Bruno Wolff III 2005-04-06 17:31:37 Re: delete to slow
Previous Message Ricardo Valença de Assis 2005-04-06 16:45:13 delete to slow