Re: Query much slower when run from postgres function - Mailing list pgsql-performance

From decibel
Subject Re: Query much slower when run from postgres function
Date
Msg-id 5005AE34-7085-499B-8B4A-B4F5AD69B183@decibel.org
Whole thread Raw
In response to Query much slower when run from postgres function  (Mario Splivalo <mario.splivalo@megafon.hr>)
List pgsql-performance
On Mar 9, 2009, at 8:36 AM, Mario Splivalo wrote:
> Now, as I was explained on pg-jdbc mailinglist, that 'SET
> enable_seqscan TO false' affects all queries on that persistent
> connection from tomcat, and It's not good solution. So I wanted to
> post here to ask what other options do I have.


FWIW, you can avoid that with SET LOCAL (though it would still affect
the rest of the transaction).

You could also store whatever enable_seqscan was set to in a variable
before setting it to false and then set it back when you're done.
--
Decibel!, aka Jim C. Nasby, Database Architect  decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828



pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal of tunable fix for scalability of 8.4
Next
From: decibel
Date:
Subject: Re: Query much slower when run from postgres function