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

2012-12-07 Thread Jeff Janes
On Wed, Dec 5, 2012 at 11:39 AM, Guillaume Smet wrote: > Hi, > > I'm struggling with a query for some time and the major problem of the > query is that the statistics are way wrong on a particular operation: > -> Nested Loop (cost=3177.72..19172.84 rows=*2* width=112) (actual > time=139.221..60

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

2012-12-07 Thread Tom Lane
Jeff Janes 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 j