Re: Actual Cost - Mailing list pgsql-hackers

From Donald Dong
Subject Re: Actual Cost
Date
Msg-id E9EAD3DD-EDC8-4187-910E-04FC3BC85721@csumb.edu
Whole thread Raw
In response to Re: Actual Cost  (Donald Dong <xdong@csumb.edu>)
List pgsql-hackers
On Feb 17, 2019, at 11:05 AM, Donald Dong <xdong@csumb.edu> wrote:
>
> On Feb 17, 2019, at 10:56 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Perhaps, but refactoring to get that seems impractically invasive &
>> expensive, since e.g. index AM cost estimate functions would have to
>> be redefined, plus we'd have to carry around some kind of cost vector
>> rather than single numbers for every Path ...
>
> Maybe we could walk through the final plan tree and fill the expression? With another tree structure to hold the cost
vectors.

Here is a draft patch. I added a new structure called CostInfo to the Plan node. The CostInfo is be added in
create_plan,and the cost calculation is centered at CostInfo. Is this a reasonable approach? 

Thank you,
Donald Dong




Attachment

pgsql-hackers by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: RE: libpq debug log
Next
From: Andres Freund
Date:
Subject: Re: libpq debug log