Re: Statistics and selectivity estimation for ranges

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: Statistics and selectivity estimation for ranges
Date: 2013-01-04 08:42:13
Message-ID: CAPpHfduHHH2gdOc7+0dY0Qw4uuiA7bKSkR_7ipq8U_upEZGiwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 10, 2012 at 11:21 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>
> And I have a few other questions/comments:
>
> * Why is "summ" spelled with two "m"s? Is it short for "summation"? If
> so, might be good to use "summation of" instead of "integrate" in the
> comment.
>

Fixed.

> * Why does get_length_hist_frac return 0.0 when i is the last value? Is
> that a mistake?
>

Comment was wrong. Actually it return fraction fraction of ranges which
length is *greater*.

> * I am still confused by the distinction between rbound_bsearch and
> rbound_bsearch_bin. What is the intuitive purpose of each?
>

I've added corresponding comments. rbound_bsearch is for scalar operators
and for bin corresponding to upper bound. rbound_bsearch_bin is
now rbound_bsearch_bin_lower. It is for bin corresponding to lower bound.

* You use "constant value" in the comments in several places. Would
> "query value" or "search key" be better?
>

Yes. Fixed.

I also renamed get_length_hist_frac to get_length_hist_summ and rewrote
comments about it. Hope it becomes more understandable.

------
With best regards,
Alexander Korotkov.

Attachment Content-Type Size
range_stat-0.10.patch.gz application/x-gzip 8.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-01-04 09:48:03 lock AccessShareLock on object 0/1260/0 is already held
Previous Message Josh Kupershmidt 2013-01-04 02:36:37 bad examples in pg_dump README