Re: Collect frequency statistics for arrays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Collect frequency statistics for arrays
Date
Msg-id 22715.1330555436@sss.pgh.pa.us
Whole thread Raw
In response to Re: Collect frequency statistics for arrays  (Nathan Boley <npboley@gmail.com>)
Responses Re: Collect frequency statistics for arrays  (Nathan Boley <npboley@gmail.com>)
Re: Collect frequency statistics for arrays  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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.  Do you think that
such applications are so common as to justify bloating pg_statistic for
everybody that uses arrays?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Parameterized-path cost comparisons need some work
Next
From: Tom Lane
Date:
Subject: Re: 16-bit page checksums for 9.2