Re: Query taking too long. Problem reading explain output.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux