X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7431E535FF for ; Fri, 8 Apr 2005 23:38:37 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64539-01 for ; Fri, 8 Apr 2005 22:38:27 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 6587F535D1 for ; Fri, 8 Apr 2005 23:38:26 +0100 (BST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j38McL4h015989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2005 16:38:25 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j38McKBO017514; Fri, 8 Apr 2005 16:38:20 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j38McKFS017513; Fri, 8 Apr 2005 16:38:20 -0600 (MDT) (envelope-from mfuhr) Date: Fri, 8 Apr 2005 16:38:20 -0600 From: Michael Fuhr To: Josh Berkus Cc: pgsql-performance@postgresql.org Subject: Re: Functionscan estimates Message-ID: <20050408223820.GA17450@winnie.fuhr.org> References: <200504081515.50340.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200504081515.50340.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/180 X-Sequence-Number: 11577 On Fri, Apr 08, 2005 at 03:15:50PM -0700, Josh Berkus wrote: > > I'm wondering if it might be useful to be able to add estimated selectivity to > a function definition for purposes of query estimation. Currently function > scans automatically return a flat default 1000 estimated rows. It seems > like the DBA ought to be able to ALTER FUNCTION and give it a row estimate > for planning purposes. About a month ago I mentioned that I'd find that useful. In a followup, Christopher Kings-Lynne brought up the idea of a GUC variable that could give hints about the expected row count. http://archives.postgresql.org/pgsql-hackers/2005-03/msg00146.php http://archives.postgresql.org/pgsql-hackers/2005-03/msg00153.php -- Michael Fuhr http://www.fuhr.org/~mfuhr/