Idea for the statistics collector

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Idea for the statistics collector
Дата
Msg-id 20020621102304.A16040@svana.org
обсуждение исходный текст
Ответы Re: Idea for the statistics collector  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Since it's currently all for collecting statistics on tables, why can't it
collect another type of statistic, like:

- How often the estimator gets it wrong?

At the end of an index scan, the executor could compare the number of rows
returned against what was estimated, and if it falls outside a certain
range, flag it.

Also, the average ratio of rows coming out of a distinct node vs the number
going in.

For a join clause, the amount of correlation between two columns (hard).

etc

Ideally, the planner could then use this info to make better plans.
Eventually, the whole system could become somewhat self-tuning.

Does anyone see any problems with this?
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: db grows and grows
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Serious Crash last Friday