| From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Noah Misch <noah(at)leadboat(dot)com>, Nathan Boley <npboley(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Collect frequency statistics for arrays |
| Date: | 2012-03-01 14:57:17 |
| Message-ID: | CAPpHfdu3tSp0d=APy6swyG4H1d9JpkSEPYZ_JjqZh=V+-L9ZYA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Mar 1, 2012 at 1:19 AM, Alexander Korotkov <aekorotkov(at)gmail(dot)com>wrote:
> On Thu, Mar 1, 2012 at 1:09 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> 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.
>>
>
> OK. I don't object to removing btree stats from arrays.
> What do you thinks about pg_stats view in this case? Should it combine
> values histogram and array length histogram in single column like do for
> MCV and MCELEM?
>
Btree statistics for arrays and additional statistics slot are removed from
attached version of patch. pg_stats view is untouched for while.
------
With best regards,
Alexander Korotkov.
| Attachment | Content-Type | Size |
|---|---|---|
| arrayanalyze-0.13.patch.gz | application/x-gzip | 22.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2012-03-01 15:00:08 | Re: Collect frequency statistics for arrays |
| Previous Message | Robert Haas | 2012-03-01 14:54:15 | performance results on IBM POWER7 |