Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C8C859FA5F7; Tue, 17 Oct 2006 23:43:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33489-03; Tue, 17 Oct 2006 23:43:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from n007.sc1.cp.net (smtpout1485.sc1.he.tucows.com [64.97.157.185]) by postgresql.org (Postfix) with ESMTP id AC8A09F9F74; Tue, 17 Oct 2006 23:43:09 -0300 (ADT) Received: from [192.168.0.12] (68.34.49.125) by n007.sc1.cp.net (7.2.069.1) (authenticated as rob@treat.com) id 453579ED00004B54; Wed, 18 Oct 2006 02:43:03 +0000 From: Robert Treat To: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Hints proposal Date: Tue, 17 Oct 2006 22:18:52 -0400 User-Agent: KMail/1.9.1 Cc: Gregory Stark , josh@agliodbs.com, "Jim C. Nasby" , pgsql-performance@postgresql.org References: <20061012151439.GT28647@nasby.net> <200610121358.22739.josh@agliodbs.com> <87odsg17uy.fsf@enterprisedb.com> In-Reply-To: <87odsg17uy.fsf@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610172218.53194.xzilla@users.sourceforge.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.58 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/336 X-Sequence-Number: 21465 On Friday 13 October 2006 12:46, Gregory Stark wrote: > Josh Berkus writes: > >> > I actually think the way to attack this issue is to discuss the kinds > >> > of errors the planner makes, and what tweaks we could do to correct > >> > them. Here's the ones I'm aware of: > >> > > >> > -- Incorrect selectivity of WHERE clause > >> > -- Incorrect selectivity of JOIN > >> > -- Wrong estimate of rows returned from SRF > >> > -- Incorrect cost estimate for index use > >> > > >> > Can you think of any others? > > -- Incorrect estimate for result of DISTINCT or GROUP BY. Yeah, that one is bad. I also ran into one the other day where the planner did not seem to understand the distinctness of a columns values across table partitions... -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL