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 1AF0211F61EA for ; Fri, 7 Apr 2006 12:12:58 -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 54356-07 for ; Fri, 7 Apr 2006 12:12:55 -0300 (ADT) 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 4228B11F6031 for ; Fri, 7 Apr 2006 12:12:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k37FCqWq012068; Fri, 7 Apr 2006 11:12:52 -0400 (EDT) To: Richard Huxton cc: Brian Herlihy , pgsql-performance@postgresql.org Subject: Re: Spotting planner errors (was Re: Query planner is using wrong index.) In-reply-to: <4436805A.1040507@archonet.com> References: <20060407064108.49532.qmail@web52315.mail.yahoo.com> <11739.1144420493@sss.pgh.pa.us> <4436805A.1040507@archonet.com> Comments: In-reply-to Richard Huxton message dated "Fri, 07 Apr 2006 16:08:10 +0100" Date: Fri, 07 Apr 2006 11:12:52 -0400 Message-ID: <12067.1144422772@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.131 required=5 tests=[AWL=0.131] X-Spam-Score: 0.131 X-Spam-Level: X-Archive-Number: 200604/136 X-Sequence-Number: 18220 Richard Huxton writes: > 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"? Not at the moment, but you could certainly imagine changing the executor to count rows even without EXPLAIN ANALYZE, and then complain during plan shutdown. Not sure how helpful that would be; there would be a lot of noise from common cases such as executing underneath a LIMIT node. regards, tom lane