Re: Collect frequency statistics for arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Collect frequency statistics for arrays
Дата
Msg-id 7833.1330549791@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Collect frequency statistics for arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: Collect frequency statistics for arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> On Thu, Mar 1, 2012 at 12:39 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I am starting to look at this patch now.  I'm wondering exactly why the
>> decision was made to continue storing btree-style statistics for arrays,

> Probably, btree statistics really does matter for some sort of arrays? For
> example, arrays representing paths in the tree. We could request a subtree
> in a range query on such arrays.

That seems like a pretty narrow, uncommon use-case.  Also, to get
accurate stats for such queries that way, you'd need really enormous
histograms.  I doubt that the existing parameters for histogram size
will permit meaningful estimation of more than the first array entry
(since we don't make the histogram any larger than we do for a scalar
column).

The real point here is that the fact that we're storing btree-style
stats for arrays is an accident, backed into by having added btree
comparators for arrays plus analyze.c's habit of applying default
scalar-oriented analysis functions to any type without an explicit
typanalyze entry.  I don't recall that we ever thought hard about
it or showed that those stats were worth anything.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: controlling the location of server-side SSL files
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Collect frequency statistics for arrays