X-Original-To: pgsql-performance@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 4E8944762F9 for ; Wed, 5 Mar 2003 10:08:39 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h25F8dx6019226; Wed, 5 Mar 2003 10:08:39 -0500 (EST) To: Greg Stark Cc: Richard Huxton , pgsql-performance@postgresql.org Subject: Re: Planner matching constants across tables in a join In-reply-to: <87bs0q9e8l.fsf@stark.dyndns.tv> References: <200303051113.14320.dev@archonet.com> <87bs0q9e8l.fsf@stark.dyndns.tv> Comments: In-reply-to Greg Stark message dated "05 Mar 2003 07:42:18 -0500" Date: Wed, 05 Mar 2003 10:08:38 -0500 Message-ID: <19225.1046876918@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/29 X-Sequence-Number: 1327 Greg Stark writes: > Richard Huxton writes: >> If I join two tables with a comparison to a constant on one, why can't the >> planner see that the comparison applies to both tables: > It sure does. Postgres does an impressive job of tracing equality clauses > around for just this purpose. CVS tip does. Existing releases don't... regards, tom lane