Re: Statistics and selectivity estimation for ranges - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Statistics and selectivity estimation for ranges
Date
Msg-id 5141D433.6020709@vmware.com
Whole thread Raw
In response to Re: Statistics and selectivity estimation for ranges  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
On 01.03.2013 16:22, Alexander Korotkov wrote:
> On Wed, Mar 13, 2013 at 11:10 PM, Heikki Linnakangas<
> hlinnakangas@vmware.com>  wrote:
>
>> On 01.03.2013 16:22, Alexander Korotkov wrote:
>>
>>>> frac = area / (length2 - length1);
>>>>
>>> you can get NaN result. I've especially adjusted the code to get more of
>>> less correct result in this case.
>>
>> Hmm, good point. I think I managed to fix those cases in the attached
>> version. Is there any other corner case that I missed?
>
> Did you try test case by Jeff Davis on this thread?
> http://www.postgresql.org/message-id/1355167304.3896.37.camel@jdavis
> I try it with attached version of patch and get NaN estimate.

Thanks, fixed that too.

Committed with a little bit more clean up and fixes. Thank you for 
bearing with this long process :-). And many thanks Jeff for the review, 
and sorry that I forgot to credit you for that in the commit message.

- Heikki



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Next
From: Thom Brown
Date:
Subject: Foreign table feedback