Re: query taking much longer since Postgres 8.4 upgrade - Mailing list pgsql-general

From Merlin Moncure
Subject Re: query taking much longer since Postgres 8.4 upgrade
Date
Msg-id AANLkTimmUk2Br3C50FiFAYSAEGLamoc9tFiw8j0s+sdf@mail.gmail.com
Whole thread Raw
In response to Re: query taking much longer since Postgres 8.4 upgrade  (tv@fuzzy.cz)
Responses Re: query taking much longer since Postgres 8.4 upgrade
List pgsql-general
On Mon, Mar 21, 2011 at 11:32 AM,  <tv@fuzzy.cz> wrote:
>> Incredible!  Setting enable_nestloop off temporarily for the run of this
>> script made it run in less than a minute (had been running in 10 or 11
>> minutes).  I think you have found a solution for many of my slow running
>> scripts that use these same type of joins.  Thanks again.
>> Julie
>
> Nice. Can you post EXPLAIN ANALYZE again, so that we can see why this plan
> was evaluated as as more expensive before disabling nested loops?

well the problem is obvious -- the planner is estimating ~ 250 loops,
when it in fact has to do ~ 60k.  That's a two orders of magnitude
miss.

merlin

pgsql-general by date:

Previous
From: tv@fuzzy.cz
Date:
Subject: Re: query taking much longer since Postgres 8.4 upgrade
Next
From: Brian Hirt
Date:
Subject: Re: Doubt in Backup