Re: Collect frequency statistics for arrays

Поиск
Список
Период
Сортировка
От Nathan Boley
Тема Re: Collect frequency statistics for arrays
Дата
Msg-id CAHetpQQDrc0-fBH6ASKu32=Ky8_d=c9dj8p+2JzLgSkrCno=Ug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Collect frequency statistics for arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Collect frequency statistics for arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Feb 29, 2012 at 2:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Nathan Boley <npboley@gmail.com> writes:
>> On Wed, Feb 29, 2012 at 12:39 PM, 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,
>>> in addition to the new stuff.
>
>> If I understand you're suggestion, queries of the form
>
>> SELECT * FROM rel
>> WHERE ARRAY[ 1,2,3,4 ] <= x
>>      AND x <=ARRAY[ 1, 2, 3, 1000];
>
>> would no longer use an index. Is that correct?
>
> No, just that we'd no longer have statistics relevant to that, and would
> have to fall back on default selectivity assumptions.

Which, currently, would mean queries of that form would typically use
a table scan, right?

> Do you think that
> such applications are so common as to justify bloating pg_statistic for
> everybody that uses arrays?

I have no idea, but it seems like it will be a substantial regression
for the people that are.

What about MCV's? Will those be removed as well?

Best,
Nathan


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade --logfile option documentation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Collect frequency statistics for arrays