Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 4561C634B0C for ; Mon, 8 Jun 2009 14:16:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 34516-06 for ; Mon, 8 Jun 2009 14:16:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.ptn-ipout01.plus.net (relay.ptn-ipout01.plus.net [212.159.7.35]) by mail.postgresql.org (Postfix) with ESMTP id E9F5E634AC4 for ; Mon, 8 Jun 2009 14:16:44 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAC/kLErUnw6U/2dsb2JhbADOKoQKBQ Received: from fhw-relay07.plus.net ([212.159.14.148]) by relay.ptn-ipout01.plus.net with ESMTP; 08 Jun 2009 18:16:41 +0100 Received: from [84.51.143.99] (helo=server3.office.archonet.com) by fhw-relay07.plus.net with esmtp (Exim) id 1MDiSf-0004vX-Iv for pgsql-general@postgresql.org; Mon, 08 Jun 2009 18:16:41 +0100 Received: from dell36.office.archonet.com (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 542B5274046 for ; Mon, 8 Jun 2009 18:16:41 +0100 (BST) Message-ID: <4A2D4779.9050303@archonet.com> Date: Mon, 08 Jun 2009 18:16:41 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: PgSql General Subject: Re: [SQL] 'cost' and 'rows' for volitile function References: <4A2D3B9D.1040909@gmail.com> <4A2D44EB.7030108@archonet.com> In-Reply-To: <4A2D44EB.7030108@archonet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Plusnet-Relay: da73590ca08b9e5485dfb36995b1bce3 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200906/408 X-Sequence-Number: 148752 Old fool that I am - forgot to cc: the list. Richard Huxton wrote: > Rob Sargent wrote: >> pg-admin is showing 'COST 100' and 'ROWS 1000' for my explicitly >> VOLATILE functions. Is one hundred the new ninety-nine? and therefore >> these values are ignored by the planner? > > No, they're the default expected cost and number of rows returned when > calling your functions. What do you think VOLATILE should be doing to them? > > http://www.postgresql.org/docs/8.3/interactive/sql-createfunction.html -- Richard Huxton Archonet Ltd