Re: Any idea on how to improve the statistics estimates for this plan?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Any idea on how to improve the statistics estimates for this plan?
Date: 2012-12-08 04:16:45
Message-ID: 2904.1354940205@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> The trivial answer to "why" is that it thinks that the vast majority
> of the 33914 rows from the hash join will find no partners in r, but
> in fact each has about 10 partner in r. Why does it think that?

I'm wondering if maybe the vast majority of the rows indeed have no join
partners, but there are a small number with a large number of partners.
The statistics might miss these, if so.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Guillaume Smet 2012-12-08 14:51:39 Re: Any idea on how to improve the statistics estimates for this plan?
Previous Message Jeff Janes 2012-12-08 02:32:15 Re: Any idea on how to improve the statistics estimates for this plan?