From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Rowell <richard@bowmansystems.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Strange behaviour
Date: Thu, 03 Aug 2006 12:39:46 -0400
Message-ID: <20305.1154623186@sss.pgh.pa.us> (raw)
In-Reply-To: <1154036222.22231.40.camel@meowth>
References: <1154036222.22231.40.camel@meowth>
Richard Rowell <richard@bowmansystems.com> writes:
> We are using a BI tool that generates some rather ugly queries. One of
> the ugly queries is taking much longer to return thin I think it
> should.
> (http://www.bowmansystems.com/~richard/full.analyze)
> Can anyone shed any light on what is going on here?
Seems like you have some bad rowcount estimates leading to poor plan
selection. Most of the problem looks to be coming from the FunctionScan
nodes, wherein the planner doesn't have any real way to estimate how
many rows come out. You might look into whether you can replace those
functions with views, so that the planner isn't dealing with "black boxes".
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, richard@bowmansystems.com
Subject: Re: Strange behaviour
In-Reply-To: <20305.1154623186@sss.pgh.pa.us>
* 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