Re: Selectivity estimation for inet operators - Mailing list pgsql-hackers

From Emre Hasegeli
Subject Re: Selectivity estimation for inet operators
Date
Msg-id 20140706150252.GA31963@hasegeli.local
Whole thread Raw
In response to Re: Selectivity estimation for inet operators  (Dilip kumar <dilip.kumar@huawei.com>)
Responses Re: Selectivity estimation for inet operators  (Dilip kumar <dilip.kumar@huawei.com>)
List pgsql-hackers
Thank you for looking at it.

> In inet_his_inclusion_selec function,
> When the constant matches only the right side of the bucket, and if it’s a last bucket then it's never considered as
partialmatch candidate. 
> In my opinion, if it's not a last bucket then for next bucket it will become left boundary and this will be treated
aspartial match so no problem, but in-case of last bucket it can give wrong selectivity. 
>
> Can't we consider it as partial bucket match if it is last bucket ?

Actually, in that case, the ratio for one value in the column is used.
I clarified the comment about it.  I do not think it is common enough
case to make the function more complicated.

> Apart from that there is one spell check you can correct
> -- in inet_his_inclusion_selec comments
> histogram boundies  -> histogram boundaries :)

I fixed it.  New version attached.  The debug log statements are also
removed.

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: tweaking NTUP_PER_BUCKET
Next
From: Stephen Frost
Date:
Subject: Re: tweaking NTUP_PER_BUCKET