X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5FE24475CEE for ; Mon, 31 Mar 2003 17:58:35 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id A64FA475C15 for ; Mon, 31 Mar 2003 17:58:34 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h2VMwW2L025847; Mon, 31 Mar 2003 17:58:32 -0500 (EST) To: "alexandre :: aldeia digital" Cc: pgsql-performance@postgresql.org Subject: Re: 30-70 seconds query... In-reply-to: <25610.1049149040@sss.pgh.pa.us> References: <10846.200.225.202.15.1049145207.squirrel@webmail.ad2.com.br> <25610.1049149040@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 31 Mar 2003 17:17:20 -0500" Date: Mon, 31 Mar 2003 17:58:32 -0500 Message-ID: <25846.1049151512@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-26.0 required=5.0 tests=BAYES_01,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/207 X-Sequence-Number: 1505 I said: > PG 7.4 will be better prepared to handle this sort of query, but I don't > think it will realize that the T1/T2 left join could be reduced to a > plain join given these conditions I take that back --- actually, the algorithm used in CVS tip *does* deduce that all these left joins can be plain joins. Don't suppose you'd like to experiment with a current snapshot to see how well it does for you? regards, tom lane