Re: What is Cost 100 in stored procedure - Mailing list pgsql-general

From Rob Wultsch
Subject Re: What is Cost 100 in stored procedure
Date
Msg-id 2c5ef4e31001122022q52cbc7c9t5739c4a1bbe539a3@mail.gmail.com
Whole thread Raw
In response to What is Cost 100 in stored procedure  (Yan Cheng Cheok <yccheok@yahoo.com>)
List pgsql-general
On Tue, Jan 12, 2010 at 8:06 PM, Yan Cheng Cheok <yccheok@yahoo.com> wrote:
> May I know what is the meaning of Cost 100, at the end of stored procedure?
>
> ....
> END;$BODY$
>  LANGUAGE 'plpgsql' VOLATILE
>  COST 100;
> ALTER FUNCTION create_tables() OWNER TO postgres;
>
> Thanks and Regards
> Yan Cheng CHEOK
>


"execution_cost

    A positive number giving the estimated execution cost for the
function, in units of cpu_operator_cost. If the function returns a
set, this is the cost per returned row. If the cost is not specified,
1 unit is assumed for C-language and internal functions, and 100 units
for functions in all other languages. Larger values cause the planner
to try to avoid evaluating the function more often than necessary. "

http://www.postgresql.org/docs/8.4/interactive/sql-createfunction.html


--
Rob Wultsch
wultsch@gmail.com

pgsql-general by date:

Previous
From: Yan Cheng Cheok
Date:
Subject: What is Cost 100 in stored procedure
Next
From: Craig Ringer
Date:
Subject: Re: Change Hard Disc Drive