From: Ow Mun Heng <Ow.Mun.Heng@wdc.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Henrik <henke@mac.se>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query taking too long. Problem reading explain output.
Date: Thu, 11 Oct 2007 11:16:23 +0800
Message-ID: <1192072583.22992.33.camel@neuromancer.home.net> (raw)
In-Reply-To: <20071004123038.GA6176@alvh.no-ip.org>
References: <AD9A1A41-C522-46A5-9756-99410F564EA7@mac.se>
<15793.1191420918@sss.pgh.pa.us>
<2E2D02AB-123A-474D-A197-91A61DC64570@mac.se>
<20071004123038.GA6176@alvh.no-ip.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Ow.Mun.Heng@wdc.com, alvherre@commandprompt.com, henke@mac.se, tgl@sss.pgh.pa.us
Subject: Re: Query taking too long. Problem reading explain output.
In-Reply-To: <1192072583.22992.33.camel@neuromancer.home.net>
References: <AD9A1A41-C522-46A5-9756-99410F564EA7@mac.se> <15793.1191420918@sss.pgh.pa.us> <2E2D02AB-123A-474D-A197-91A61DC64570@mac.se> <20071004123038.GA6176@alvh.no-ip.org> <1192072583.22992.33.camel@neuromancer.home.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox