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

From: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Henrik <henke(at)mac(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Query taking too long. Problem reading explain output.
Date: 2007-10-11 03:16:23
Message-ID: 1192072583.22992.33.camel@neuromancer.home.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Cédric Villemain 2007-10-11 08:51:58 Re: Performance problems with prepared statements
Previous Message Greg Smith 2007-10-11 03:14:02 Re: building a performance test suite