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

From Davenport, Julie
Subject Re: query taking much longer since Postgres 8.4 upgrade
Date
Msg-id FC3C063A33946548BBC77657D3A2AF750F135E00@ctc385b.campus.ctcd.org
Whole thread Raw
In response to Re: query taking much longer since Postgres 8.4 upgrade  (tv@fuzzy.cz)
List pgsql-general
Here is the explain plan of the new query (same as original but with changes to the Date subquery to use ::date instead
ofto_char to truncate the time portion), when it is run after doing these 2 sets first:
 

set work_mem='8MB';

set enable_nestloop = false;

explain plan (8.4):  http://explain.depesz.com/s/tw8

thanks again for the help.
Julie




-----Original Message-----
From: tv@fuzzy.cz [mailto:tv@fuzzy.cz] 
Sent: Monday, March 21, 2011 11:33 AM
To: Davenport, Julie
Cc: Merlin Moncure; Tomas Vondra; pgsql-general@postgresql.org
Subject: RE: [GENERAL] query taking much longer since Postgres 8.4 upgrade

> 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?

regards
Tomas


pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: General question
Next
From: "Sven Haag"
Date:
Subject: Recursive function that receives a list of IDs and returns all child IDs