Re: BUG #16759: Estimation of the planner is wrong for hash join - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16759: Estimation of the planner is wrong for hash join
Date
Msg-id 1672657.1606940979@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16759: Estimation of the planner is wrong for hash join  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16760: Standby database missed records for at least 1 table
Next
From: Tom Lane
Date:
Subject: Re: BUG #16759: Estimation of the planner is wrong for hash join