Re: Query taking too long. Problem reading explain output. - Mailing list pgsql-performance

From Ow Mun Heng
Subject Re: Query taking too long. Problem reading explain output.
Date
Msg-id 1192072583.22992.33.camel@neuromancer.home.net
Whole thread Raw
In response to Re: Query taking too long. Problem reading explain output.  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-performance
On Thu, 2007-10-04 at 08:30 -0400, Alvaro Herrera wrote:
> Henrik wrote:
>
> > Ahh I had exactly 8 joins.
> > Following your suggestion I raised the join_collapse_limit from 8 to 10 and
> > the planners decision sure changed but now I have some crazy nested loops.
> > Maybe I have some statistics wrong?
>
> Yeah.  The problematic misestimation is exactly the innermost indexscan,
> which is wrong by two orders of magnitude:


Nested Loops are evil.. and I've no clue on why PG has such big
mis-estimates. Mine are like 1:500

I've solved mine using SRFs

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: building a performance test suite
Next
From: Cédric Villemain
Date:
Subject: Re: Performance problems with prepared statements