Re: Actual Cost

Поиск
Список
Период
Сортировка
От Donald Dong
Тема Re: Actual Cost
Дата
Msg-id F843D386-5020-4A0F-BC1D-58550B2C7489@csumb.edu
обсуждение исходный текст
Ответ на Re: Actual Cost  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: Actual Cost  (Donald Dong <xdong@csumb.edu>)
Список pgsql-hackers
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.

On Feb 17, 2019, at 8:29 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
> I don't think there is any way to assign an actual cost.  For example how do you know if a buffer read was "actually"
seq_page_costor random_page_cost?  And if there were a way, it too would have a high variance. 

Thanks for pointing that out! I think it's probably fine to use the same assumptions as the cost model? For example, we
assume3/4ths of accesses are sequential, 1/4th are not. 

> What would I find very useful is a verbosity option to get the cost estimates expressed as a multiplier of each
*_costparameter, rather than just as a scalar. 

Yeah, such expression would also help if we want to plug in the actual values.


On Feb 17, 2019, at 4:11 AM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> Perhaps I'm just too used to comparing the rows/pages directly, but I
> don't quite see the benefit of having such "actual cost". Mostly because
> the cost model is rather rough anyway.

Yeah, I think the "actual cost" is only "actual" for the cost model - the cost it would output given the exact row/page
number.Some articles/papers have shown row estimation is the primary reason for planners to go off, so showing the
actual(or the updated assumption) might also be useful if people want to compare different plans and want to refer to a
moreaccurate quantitative measure. 

regards,
Donald Dong

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Actual Cost
Следующее
От: Andres Freund
Дата:
Сообщение: Re: allow online change primary_conninfo