From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Statistics and selectivity estimation for ranges |
Date: | 2012-08-16 12:40:45 |
Message-ID: | 502CEA4D.4060704@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 15.08.2012 11:34, Alexander Korotkov wrote:
> On Wed, Aug 15, 2012 at 12:14 PM, Heikki Linnakangas<
> heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>
>> Histogram of upper bounds would be both more
>>> accurate and natural for some operators. However, it requires collecting
>>> additional statistics while AFAICS it doesn't liberate us from having
>>> histogram of range lengths.
>>
>> Hmm, if we collected a histogram of lower bounds and a histogram of upper
>> bounds, that would be roughly the same amount of data as for the "standard"
>> histogram with both bounds in the same histogram.
>
> Ok, we've to decide if we need "standard" histogram. In some cases it can
> be used for more accurate estimation of< and> operators.
> But I think it is not so important. So, we can replace "standard" histogram
> with histograms of lower and upper bounds?
Yeah, I think that makes more sense. The lower bound histogram is still
useful for < and > operators, just not as accurate if there are lots of
values with the same lower bound but different upper bound.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2012-08-16 12:41:43 | Re: Statistics and selectivity estimation for ranges |
Previous Message | Heikki Linnakangas | 2012-08-16 11:46:34 | Re: SP-GiST for ranges based on 2d-mapping and quad-tree |