pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: bertrand.guillaumin@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16759: Estimation of the planner is wrong for hash join
Date: Wed, 02 Dec 2020 15:29:39 -0500
Message-ID: <1672657.1606940979@sss.pgh.pa.us> (raw)
In-Reply-To: <16759-f0980add03d8f152@postgresql.org>
References: <16759-f0980add03d8f152@postgresql.org>

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





view thread (6+ messages)  latest in thread

Message-ID: <1672657.1606940979@sss.pgh.pa.us>
Permalink:  ../1672657.1606940979@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1672657.1606940979@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bertrand.guillaumin@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16759: Estimation of the planner is wrong for hash join
  In-Reply-To: <1672657.1606940979@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox