Re: BUG #16759: Estimation of the planner is wrong for hash join

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bertrand(dot)guillaumin(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16759: Estimation of the planner is wrong for hash join
Date: 2020-12-02 20:29:39
Message-ID: 1672657.1606940979@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> The following query estimated number of lines returned is 1 while it should
> be around 67 or more :
> explain analyze select * from enterprise where parent_enterprise in (select
> enterprise_id from enterprise par where global_attribute15 = 'BEL');

I failed to reproduce this result, which is unsurprising given the
lack of context. Can you provide a self-contained example?

I think that highly accurate estimates are unlikely in this situation,
but it is odd that "parent_enterprise in (select...)" is estimating
fewer rows than "parent_enterprise = something".

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-12-02 22:33:15 Re: BUG #16759: Estimation of the planner is wrong for hash join
Previous Message PG Bug reporting form 2020-12-02 20:22:37 BUG #16760: Standby database missed records for at least 1 table