Incredible! Setting enable_nestloop off temporarily for the run of this script made it run in less than a minute (had
beenrunning in 10 or 11 minutes). I think you have found a solution for many of my slow running scripts that use these
sametype of joins. Thanks again.
Julie
>>-----Original Message-----
>>From: Merlin Moncure [mailto:mmoncure@gmail.com]
>>Sent: Friday, March 18, 2011 1:18 PM
>>To: Davenport, Julie
>>Cc: Tomas Vondra; pgsql-general@postgresql.org
>>Subject: Re: [GENERAL] query taking much longer since Postgres 8.4 upgrade
>>>>On Fri, Mar 18, 2011 at 10:42 AM, Davenport, Julie <JDavenport@ctcd.edu> wrote:
>>>> This helped, is now down from 14.9 min to 10.9 min to run the entire script. Thanks.
>>can you try disabling nestloop and see what happens? In the session,
>>before running the query, isssue:
>>set enable_nestloop = false;
>>merlin