Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] Query much slower when run from postgres function

From: Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>, Guillaume Cottenceau <gc(at)mnc(dot)ch>, Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr>, pgsql-performance(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [PERFORM] Query much slower when run from postgres function
Date: 2009-03-09 17:42:16
Message-ID: 49B554F8.7090603@netzmeister-st-pauli.de (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-performance
Tom Lane schrieb:
> Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com> writes:
>> Unnamed prepared statements are planned after binding the values,
>> starting with 8.3, or more precisely starting with 8.3.2 as early 8.3
>> versions were partially broken on this behalf.
> 
> No, 8.2 did it too (otherwise we wouldn't have considered 8.3.0 to be
> broken...).  The thing I'm not too clear about is what "use of an
> unnamed statement" translates to for a JDBC user.
> 
> 			regards, tom lane
>
I followed another post in the PHP List. Andrew McMillan was talking 
about his experiences with udf's in Oracle and PG (--> look for subject: 
Re: [PHP] pl/php for windows). He was writing that, by using udf's, the 
planner sometimes uses strange and not performant plans. So generally I 
understood that using udf's is a good idea - compared with the work I 
have to do when I code that e.g in PHP and also compared to the better 
resulting performance with udf's. So what is your experience with using 
udf's (plpgsql)? Is there something like "use it in this case but not in 
that case"?

Your answers are very welcome ...

Cheers

Andy



In response to

pgsql-performance by date

Next:From: Mario SplivaloDate: 2009-03-09 19:13:01
Subject: Re: Query much slower when run from postgres function
Previous:From: Tom LaneDate: 2009-03-09 17:16:34
Subject: Re: [PERFORM] Query much slower when run from postgres function

pgsql-jdbc by date

Next:From: Mario SplivaloDate: 2009-03-09 19:13:01
Subject: Re: Query much slower when run from postgres function
Previous:From: Tom LaneDate: 2009-03-09 17:16:34
Subject: Re: [PERFORM] Query much slower when run from postgres function

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group