Re: A costing analysis tool

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A costing analysis tool
Дата
Msg-id 24296.1129315057@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: A costing analysis tool  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: A costing analysis tool  (Greg Stark <gsstark@mit.edu>)
Re: A costing analysis tool  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> I propose capturing only three values from the output of explain
> analyze, and saving it with many columns of context information.

You really have to capture the rowcounts (est and actual) too.
Otherwise you can't tell if it's a costing problem or a statistics
problem.

More generally, I think that depending entirely on EXPLAIN ANALYZE
numbers is a bad idea, because the overhead of EXPLAIN ANALYZE is both
significant and variable depending on the plan structure.  The numbers
that I think we must capture are the top-level EXPLAIN cost and the
actual runtime of the query (*without* EXPLAIN).  Those are the things
we would like to get to track closely.  EXPLAIN ANALYZE is incredibly
valuable as context for such numbers, but it's not the thing we actually
wish to optimize.

> Besides the additional context info, I expect to be storing the log
> of the ratio, since it seems to make more sense to average and
> look for outliers based on that than the raw ratio.

Why would you store anything but raw data?  Easily-derivable numbers
should be computed while querying the database, not kept in it.
        regards, tom lane


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: A costing analysis tool
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: A costing analysis tool