Re: [HACKERS] <> join selectivity estimate question - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: [HACKERS] <> join selectivity estimate question
Date
Msg-id CAFiTN-ufkH0wYdsF2poHAMvexosXQHHAb-Dfi55R+3SMXMLaFw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] <> join selectivity estimate question  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] <> join selectivity estimate question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jun 1, 2017 at 8:24 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, May 31, 2017 at 1:18 PM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
>> +       if (jointype = JOIN_SEMI)
>> +       {
>> +               sjinfo->jointype = JOIN_INNER;
>> +       }
>
> That is pretty obviously half-baked and completely untested.

Actually, I was not proposing this patch instead I wanted to discuss
the approach.  I was claiming that for
non-equal JOIN_SEMI selectivity estimation instead of calculating
selectivity in an existing way i.e
= 1- (selectivity of equal JOIN_SEMI)  the better way would be = 1-
(selectivity of equal).  I have only tested only standalone scenario
where it solves the problem but not the TPCH cases.  But I was more
interested in discussing that the way I am thinking how it should
calculate the nonequal SEMI join selectivity make any sense.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] TPC-H Q20 from 1 hour to 19 hours!
Next
From: Teodor Sigaev
Date:
Subject: Re: [HACKERS] Perfomance bug in v10