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 5091711F6B08 for ; Fri, 7 Apr 2006 12:08:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55120-02 for ; Fri, 7 Apr 2006 12:08:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pih-relay06.plus.net (pih-relay06.plus.net [212.159.14.133]) by postgresql.org (Postfix) with ESMTP id 99A8D11F61E0 for ; Fri, 7 Apr 2006 12:08:13 -0300 (ADT) Received: from [213.162.97.75] (helo=mail.metronet.co.uk) by pih-relay06.plus.net with esmtp (Exim) id 1FRsZI-0000Ng-Fr; Fri, 07 Apr 2006 16:08:12 +0100 Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id E313D735D1; Fri, 7 Apr 2006 16:09:18 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id C5290FF04; Fri, 7 Apr 2006 16:08:10 +0100 (BST) Message-ID: <4436805A.1040507@archonet.com> Date: Fri, 07 Apr 2006 16:08:10 +0100 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Tom Lane Cc: Brian Herlihy , pgsql-performance@postgresql.org Subject: Spotting planner errors (was Re: Query planner is using wrong index.) References: <20060407064108.49532.qmail@web52315.mail.yahoo.com> <11739.1144420493@sss.pgh.pa.us> In-Reply-To: <11739.1144420493@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200604/135 X-Sequence-Number: 18219 Tom Lane wrote: > Brian Herlihy writes: >> Before I go, I have a question - From discussions on the Postgresql irc >> channel, and from reading the TODO list on the website, I am under the >> impression that there are no plans to allow optimizer hints, such as "use index >> table_pkey". Is this really true? > > I personally don't think it's a good idea: the time spent in designing, > implementing, and maintaining a usable hint system would be significant, > and IMHO the effort is better spent on *fixing* the optimizer problems > than working around them. Tom - does the planner/executor know it's got row estimates wrong? That is, if I'm not running an EXPLAIN ANALYSE is there a point at which we could log "planner estimate for X out by factor of Y"? -- Richard Huxton Archonet Ltd