Re: Collect frequency statistics for arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Collect frequency statistics for arrays
Дата
Msg-id 11732.1330720601@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Collect frequency statistics for arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Collect frequency statistics for arrays
Список pgsql-hackers
I wrote:
> ... So my preference is to align the two
> definitions of STATISTIC_KIND_MCELEM by adding a null-element frequency
> to tsvector's usage (where it'll always be zero) and getting rid of the
> average distinct element count here.

Actually, there's a way we can do this without code changes in the
tsvector stuff.  Since the number of MCELEM stanumber items that provide
frequencies of stavalue items is obviously equal to the length of
stavalues, we could define stanumbers as containing those matching
entries, then two min/max entries, then an *optional* entry for the
frequency of null elements (with the frequency presumed to be zero if
omitted).  This'd be non-ambiguous given access to stavalues.  I'm not
sure though if making the null frequency optional wouldn't introduce
complexity elsewhere that outweighs not having to touch the tsvector
code.
        regards, tom lane


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: index-only quals vs. security_barrier views
Следующее
От: Robert Haas
Дата:
Сообщение: sortsupport for text