Re: Query much slower when run from postgres function

From: decibel
Subject: Re: Query much slower when run from postgres function
Date: ,
Msg-id: 5005AE34-7085-499B-8B4A-B4F5AD69B183@decibel.org
(view: Whole thread, Raw)
In response to: Query much slower when run from postgres function  (Mario Splivalo)
List: pgsql-performance

Tree view

Query much slower when run from postgres function  (Mario Splivalo, )
 Re: Query much slower when run from postgres function  (Tom Lane, )
  Re: Query much slower when run from postgres function  (Guillaume Cottenceau, )
   Re: [JDBC] Query much slower when run from postgres function  (Guillaume Smet, )
    Re: [JDBC] Query much slower when run from postgres function  (Tom Lane, )
     Re: [JDBC] Query much slower when run from postgres function  (Andreas Wenk, )
     Re: [JDBC] Query much slower when run from postgres function  (Dave Cramer, )
      Re: [JDBC] Query much slower when run from postgres function  (James Mansion, )
    Re: [JDBC] Query much slower when run from postgres function  (Scott Carey, )
   Re: Query much slower when run from postgres function  (Mario Splivalo, )
  Re: Query much slower when run from postgres function  (Mario Splivalo, )
   Re: Query much slower when run from postgres function  (Tom Lane, )
    Re: Query much slower when run from postgres function  (Mario Splivalo, )
     Re: Query much slower when run from postgres function  (Tom Lane, )
  Re: Query much slower when run from postgres function  ( (Frank Ch. Eigler), )
   Re: Query much slower when run from postgres function  (Tom Lane, )
    Re: Query much slower when run from postgres function  (decibel, )
     Re: Query much slower when run from postgres function  (Віталій Тимчишин, )
 Re: Query much slower when run from postgres function  (decibel, )

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  
Give your computer some brain candy! www.distributed.net Team #1828




pgsql-performance by date:

From: decibel
Date:
Subject: Re: Proposal of tunable fix for scalability of 8.4
From: Matteo Beccati
Date:
Subject: Re: Query performance over a large proportion of data