X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EABF652EC7 for ; Fri, 19 Aug 2005 12:41:23 -0300 (ADT) 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 05428-05 for ; Fri, 19 Aug 2005 15:41:17 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 428B352DD0 for ; Fri, 19 Aug 2005 12:40:50 -0300 (ADT) 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 j7JFeneQ025397; Fri, 19 Aug 2005 11:40:50 -0400 (EDT) To: "Diego de Lima" Cc: pgsql-performance@postgresql.org Subject: Re: LEFT JOIN ON vs. LEFT JOIN USING performance In-reply-to: <002a01c5a4d1$d36f6420$3dc8a8c0@diretoria02> References: <002a01c5a4d1$d36f6420$3dc8a8c0@diretoria02> Comments: In-reply-to "Diego de Lima" message dated "Fri, 19 Aug 2005 12:22:35 -0300" Date: Fri, 19 Aug 2005 11:40:49 -0400 Message-ID: <25396.1124466049@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.246 required=5 tests=[AWL=-0.235, INFO_TLD=0.481] X-Spam-Level: X-Archive-Number: 200508/268 X-Sequence-Number: 14015 "Diego de Lima" writes: > I have some very complex select statements on 4 million rows tables. = > When using LEFT JOIN ON, some select statements takes about 2 minutes. = > When I write exactly the same statement but with LEFT JOIN USING, it = > takes only 1 minute. Could we see details please? Like the table schemas, the query itself, and EXPLAIN ANALYZE results for both cases. regards, tom lane