Thread: delete to slow
View Single Post

   
  #3 (permalink)  
Old 04-10-2008, 12:39 AM
Tom Lane
 
Posts: n/a
Default Re: delete to slow

=?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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote