|From:||Donald Dong <xdong(at)csumb(dot)edu>|
|To:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>|
|Cc:||David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>|
|Subject:||Re: Actual Cost|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On Feb 17, 2019, at 11:05 AM, Donald Dong <xdong(at)csumb(dot)edu> wrote:
> On Feb 17, 2019, at 10:56 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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?
|Next Message||Andres Freund||2019-02-18 02:37:58||Re: libpq debug log|
|Previous Message||Jamison, Kirk||2019-02-18 02:23:12||RE: libpq debug log|