X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D1E5753541 for ; Wed, 6 Apr 2005 18:27:49 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31090-10 for ; Wed, 6 Apr 2005 17:27:45 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8A25F5353F for ; Wed, 6 Apr 2005 18:27:44 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j36HRgp5028472; Wed, 6 Apr 2005 13:27:43 -0400 (EDT) To: =?iso-8859-1?Q?Ricardo_Valen=E7a_de_Assis?= Cc: pgsql-admin@postgresql.org Subject: Re: delete to slow In-reply-to: <006701c53ac8$014b27e0$1b00280a@ugf.br> References: <006701c53ac8$014b27e0$1b00280a@ugf.br> Comments: In-reply-to =?iso-8859-1?Q?Ricardo_Valen=E7a_de_Assis?= message dated "Wed, 06 Apr 2005 13:45:13 -0300" Date: Wed, 06 Apr 2005 13:27:42 -0400 Message-ID: <28471.1112808462@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.11 tagged_above=0 required=5 tests=AWL, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200504/78 X-Sequence-Number: 17091 =?iso-8859-1?Q?Ricardo_Valen=E7a_de_Assis?= 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