| 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 |
| Date: | 2019-02-18 02:27:13 |
| Message-ID: | E9EAD3DD-EDC8-4187-910E-04FC3BC85721@csumb.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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?
Thank you,
Donald Dong
| Attachment | Content-Type | Size |
|---|---|---|
| 01_actual_cost_seqscan_001.patch | application/octet-stream | 8.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| 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 |