Thread: Create one prepared function

Create one prepared function

From
Marcos José Setim
Date:
Hi,

I'd like that create functions in plpgsql with prepared SQL and plan
saved, to that the Postgresl increase the performance of executions.

This is possible?

I would like to see a simple example of use this, if this is possible, i
find for examples in the google, but the joined result is little direct
and many dispersed.

Very Thanks!!!!!!

--
__________________
Marcos José Setim
mjs_ops@gmx.net
http://www.linuxhard.org


Re: Create one prepared function

From
Neil Conway
Date:
On Sun, 2006-01-08 at 00:12 +0000, Marcos José Setim wrote:
> I'd like that create functions in plpgsql with prepared SQL and plan
> saved, to that the Postgresl increase the performance of executions.
>
> This is possible?

plpgsql internally caches query plans the first time a function is
invoked in a given session, so there is probably no (performance) reason
to do it by hand.

-Neil