Re: Planner tuning

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Alban Hertroys <alban(at)magproductions(dot)nl>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Planner tuning
Date: 2007-03-19 15:38:34
Message-ID: 45FEAE7A.5000703@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alban Hertroys wrote:
> I have a query here for which postgres chooses a nested loop, for which
> it takes ~19s to complete in the worst-case (measured). However, if I
> disable nestloops it completes in ~400ms...
>
> It seems pretty obvious that the planner underestimates the cost of
> nestloops here, is there some way to tweak this?

Ok, I think I've figured this one out. A few order by's after the groups
in my subqueries helped a _lot_. I'm now back under 1s again.

> This is using PostgreSQL 8.1.4 on x86_64-pc-linux-gnu, compiled by GCC
> cc (GCC) 3.3.5 (Debian 1:3.3.5-13)
>
> The server is on some kind of xen domain. I have absolutely no idea what
> impact that has for various planner parameters (except that it'll
> probably not perform as well as an unxenned server), it may be relevant.
>
> The plans with and w/o nestloops respectively are attached (to prevent
> wrapping).
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2007-03-19 15:51:57 Re: deleting a foreign key that has no references
Previous Message Vivek Khera 2007-03-19 15:07:37 anyone heard of/use SurfRAID Triton product with postgres?