Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D24F7632414 for ; Fri, 16 Apr 2010 12:46:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 15117-07 for ; Fri, 16 Apr 2010 15:45:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id D786C6322B6 for ; Fri, 16 Apr 2010 12:45:53 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o3GFjmdZ010158; Fri, 16 Apr 2010 11:45:48 -0400 (EDT) To: Yeb Havinga cc: =?UTF-8?B?0JLRltGC0LDQu9GW0Lkg0KLQuNC80YfQuNGI0LjQvQ==?= , pgsql-performance@postgresql.org Subject: Re: Planner not using column limit specified for one column for another column equal to first In-reply-to: <4BC88364.9050404@gmail.com> References: <8534.1271427587@sss.pgh.pa.us> <4BC88364.9050404@gmail.com> Comments: In-reply-to Yeb Havinga message dated "Fri, 16 Apr 2010 17:33:56 +0200" Date: Fri, 16 Apr 2010 11:45:48 -0400 Message-ID: <10157.1271432748@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.116 tagged_above=-10 required=5 tests=AWL=-0.206, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/211 X-Sequence-Number: 38461 Yeb Havinga writes: > New expensive planner infrastructure to support from a>b and b>c infer > a>c, yes. > But I wonder if something like Leibniz's principle of identity holds for > members of the same equivalence class, e.g. like if x,y are both members > of the same EC, then for every predicate P, P(x) iff P(y). This could only be assumed to apply for predicates constructed from operators that are in the equivalence operator's btree opfamily. Now, that would certainly be a large enough set of cases to sometimes give useful results --- but I stand by the opinion that it wouldn't win often enough to justify the added planner overhead. regards, tom lane