Re: WIP patch: distinguish selectivity of < from <= and > from >=

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP patch: distinguish selectivity of < from <= and > from >=
Date: 2017-07-05 22:15:24
Message-ID: 29667.1499292924@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> (Pokes at it some more...) Oh, interesting: it behaves that way except
> when p is exactly the lowest histogram entry.

Here's a revised version that addresses that point and cleans up some
other minor details about treatment of cases near the histogram endpoints.
I'm still pretty unclear on exactly why it works (see XXX comments in
patch), but testing shows that it does work very well indeed given a flat
data distribution. On less-flat distributions, you get some estimation
errors, but that's neither new nor surprising.

regards, tom lane

Attachment Content-Type Size
improve-scalar-inequality-estimates-2.patch text/x-diff 77.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-07-05 23:21:04 Re: Re: Error-like LOG when connecting with SSL for password authentication
Previous Message AP 2017-07-05 21:10:29 Re: pgsql 10: hash indexes testing