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