Re: set the cost of an aggregate function - Mailing list pgsql-hackers

From Robert Haas
Subject Re: set the cost of an aggregate function
Date
Msg-id 603c8f070912021819l7bed46fdm8994f863c290e2@mail.gmail.com
Whole thread Raw
In response to Re: set the cost of an aggregate function  (Jaime Casanova <jcasanov@systemguards.com.ec>)
List pgsql-hackers
On Mon, Nov 30, 2009 at 11:53 AM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> 2009/11/30 Jaime Casanova <jcasanov@systemguards.com.ec>:
>> Hi,
>>
>> why we can't do $subject? it could have any benefit on the planner?
>>
>
> seems like while we can set the cost of the state transition function,
> that cost is not propagated...

I thought for sure you must be wrong about this, but I just read the
source code and, sure enough, the cost of the transition and final
functions are totally ignored.  In fact, there's a comment about this
in cost_agg():
        * Note: ideally we should use the pg_proc.procost costs of each        * aggregate's component functions, but
fornow that seems like an        * excessive amount of work.
 

...Robert


pgsql-hackers by date:

Previous
From: Jon Erdman
Date:
Subject: Proposing new logline_prefix escape...
Next
From: KaiGai Kohei
Date:
Subject: Re: SE-PgSQL patch review