X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 90BE59DCC99 for ; Thu, 16 Mar 2006 15:45:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 91694-03 for ; Thu, 16 Mar 2006 15:45:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 16B719DCBD9 for ; Thu, 16 Mar 2006 15:45:33 -0400 (AST) 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 k2GJjYwa019305; Thu, 16 Mar 2006 14:45:35 -0500 (EST) To: Simon Riggs cc: Kevin Grittner , pgsql-performance@postgresql.org, Andreas Kretschmer Subject: Re: BETWEEN optimizer problems with single-value In-reply-to: <1142537298.3859.497.camel@localhost.localdomain> References: <44180105.EE98.0025.0@wicourts.gov> <20060315181735.GA22240@KanotixBox> <44180D33.EE98.0025.0@wicourts.gov> <28798.1142450270@sss.pgh.pa.us> <1142467626.3859.207.camel@localhost.localdomain> <1142468678.3859.221.camel@localhost.localdomain> <11428.1142474724@sss.pgh.pa.us> <1142510032.3859.320.camel@localhost.localdomain> <17043.1142524621@sss.pgh.pa.us> <1142537298.3859.497.camel@localhost.localdomain> Comments: In-reply-to Simon Riggs message dated "Thu, 16 Mar 2006 19:28:18 +0000" Date: Thu, 16 Mar 2006 14:45:34 -0500 Message-ID: <19304.1142538334@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200603/253 X-Sequence-Number: 17690 Simon Riggs writes: > I was thinking that we would fill out the OpExpr with different > opclasses for each plan, so each one sees a different story. (I was > thinking there was a clauselist for each plan; if not, there could be.) This is backwards: there isn't a plan yet. If there were, having clauselist_selectivity return different answers depending on what index the plan was thinking of using would still be wrong. > [BTW how do you add new indexes to system tables? I want to add one to > pg_inherits but not sure where to look.] src/include/catalog/indexing.h Offhand I think adding a new entry is all you have to do. You may also want a syscache to go with it, which'll take a bit more work. regards, tom lane