Re: delete to slow - Mailing list pgsql-admin

From Tom Lane
Subject Re: delete to slow
Date
Msg-id 28471.1112808462@sss.pgh.pa.us
Whole thread Raw
In response to delete to slow  (Ricardo Valença de Assis <valenca@campusvirtual.br>)
List pgsql-admin
=?iso-8859-1?Q?Ricardo_Valen=E7a_de_Assis?= <valenca@campusvirtual.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

pgsql-admin by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: delete to slow
Next
From: Ricardo Valença de Assis
Date:
Subject: Re: delete to slow