X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C4E86536DF for ; Thu, 7 Apr 2005 22:26:41 +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 17654-06 for ; Thu, 7 Apr 2005 21:26:38 +0000 (GMT) Received: from priv-edtnes56.telusplanet.net (outbound01.telus.net [199.185.220.220]) by svr1.postgresql.org (Postfix) with ESMTP id 1D44253519 for ; Thu, 7 Apr 2005 22:26:37 +0100 (BST) Received: from localhost ([199.185.220.240]) by priv-edtnes56.telusplanet.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050407212638.FQES9708.priv-edtnes56.telusplanet.net@localhost> for ; Thu, 7 Apr 2005 15:26:38 -0600 Received: from 209.17.183.249 ( [209.17.183.249]) as user a3a18850@192.168.200.1 by webmail.telus.net with HTTP; Thu, 7 Apr 2005 14:26:38 -0700 Message-ID: <1112909198.4255a58eae0d8@webmail.telus.net> Date: Thu, 7 Apr 2005 14:26:38 -0700 From: Mischa To: pgsql-performance@postgresql.org Subject: Re: Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient) References: <425413D3.5030304@vulcanus.its.tudelft.nl> <28552.1112809334@sss.pgh.pa.us> <425423A9.9000504@vulcanus.its.tudelft.nl> <5999.1112820690@sss.pgh.pa.us> <6326.1112825377@sss.pgh.pa.us> <20050407143120.GA29575@wolff.to> <16907.1112883624@sss.pgh.pa.us> In-Reply-To: <16907.1112883624@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1-cvs X-Originating-IP: 209.17.183.249 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.082 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200504/172 X-Sequence-Number: 11569 Quoting Tom Lane : > Yeah, the whole thing is only a heuristic anyway. I've been coming > around to the view that relation membership shouldn't matter, because > of cases like > > WHERE a.x > b.y AND a.x < 42 > > which surely should be taken as a range constraint. Out of curiosity, will the planner induce "b.y < 42" out of this? -- "Dreams come true, not free."