Am 27.09.2012, 02:04 Uhr, schrieb Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:
> On Wed, Sep 26, 2012 at 1:21 PM, hubert depesz lubaczewski
> <depesz(at)depesz(dot)com> wrote:
>> On Wed, Sep 26, 2012 at 02:38:09PM -0400, Robert Sosinski wrote:
>>> The first query shows a cost of 190,169.55 and runs in 199,806.951 ms.
>>> When I disable nested loop, I get a cost of 2,535,992.34 which runs in
>>> only 133,447.790 ms. We have run queries on our database with a cost
>>> of 200K cost before and they ran less then a few seconds, which makes
>>> me wonder if the first query plan is inaccurate. The other issue is
>>> understanding why a query plan with a much higher cost is taking less
>>> time to run.
>> Are you under impression that cost should be somehow related to actual
> I am certainly under that impression. If the estimated cost has
> nothing to do with run time, then what is it that the cost-based
> optimizer is trying to optimize?
section "18.7.2. Planner Cost Constants".
In response to
pgsql-performance by date
|Next:||From: M. D.||Date: 2012-09-27 19:11:24|
|Subject: hardware advice|
|Previous:||From: Undertaker Rude||Date: 2012-09-27 09:01:48|
|Subject: Re: Same query doing slow then quick|
pgsql-general by date
|Next:||From: Albe Laurenz||Date: 2012-09-27 10:51:16|
|Subject: Re: unc paths, like and backslashes on 8.4|
|Previous:||From: Albe Laurenz||Date: 2012-09-27 10:39:15|
|Subject: Re: Re: Need help in reclaiming disk space by deleting the selected records|