X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8D7EF476351 for ; Tue, 6 May 2003 11:33:46 -0400 (EDT) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id C4480476375 for ; Tue, 6 May 2003 11:33:45 -0400 (EDT) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h46GIUF0015588; Tue, 6 May 2003 12:18:30 -0400 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id h46FXfC30369; Tue, 6 May 2003 11:33:41 -0400 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 2YCPXW0Q; Tue, 6 May 2003 11:33:39 -0400 Subject: Re: Hypothetical suggestions for planner, indexing From: Robert Treat To: Tom Lane Cc: Josh Berkus , pgsql-hackers@postgresql.org In-Reply-To: <22400.1052196330@sss.pgh.pa.us> References: <200305051219.58955.josh@agliodbs.com> <22292.1052195133@sss.pgh.pa.us> <200305052133.33680.josh@agliodbs.com> <22400.1052196330@sss.pgh.pa.us> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 06 May 2003 11:33:41 -0400 Message-Id: <1052235221.30177.26.camel@camel> Mime-Version: 1.0 X-Spam-Status: No, hits=-38.8 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/109 X-Sequence-Number: 38616 On Tue, 2003-05-06 at 00:45, Tom Lane wrote: > Josh Berkus writes: > > The reason that I mention EXISTS is because that's where the lack of > > cross-column corellation is most dramatic; the planner seems to estimate a > > flat 50% for EXISTS clauses regardless of the content. > > No "seems to" about that one: see src/backend/optimizer/path/clausesel.c > > else if (is_subplan(clause)) > { > /* > * Just for the moment! FIX ME! - vadim 02/04/98 > */ > s1 = (Selectivity) 0.5; > } > > Patches to improve this are welcome ;-). But I'm not at all sure how to > write something that would extract a reliable selectivity estimate from > a subplan. > given that we have so few GUC variables... would there be any merit in adding one that would allow folks to change this assumption? Robert Treat