Re: Thoughts on statistics for continuously advancing columns

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Thoughts on statistics for continuously advancing columns
Дата
Msg-id 1262200897.15659.4.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: Thoughts on statistics for continuously advancing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Thoughts on statistics for continuously advancing columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On tis, 2009-12-29 at 22:08 -0500, Tom Lane wrote:
> This seems like a fundamentally broken approach, first because "time
> between analyzes" is not even approximately a constant, and second
> because it assumes that we have a distance metric for all datatypes.

Maybe you could compute a correlation between the column values and the
transaction numbers to recognize a continuously advancing column.  It
wouldn't tell you much about how fast they are advancing, but at least
the typical use cases of serial and current timestamp columns should
clearly stick out.  And then instead of assuming that a value beyond the
histogram bound doesn't exist, you assume for example the average
frequency, which should be pretty good for the serial and timestamp
cases.  (Next step: Fourier analysis ;-) )



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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Thoughts on statistics for continuously advancing columns
Следующее
От: Robert Haas
Дата:
Сообщение: Re: PATCH: Add hstore_to_json()