Re: [GENERAL] function result cache for pl/pgsql

2007-10-24 Thread Pavel Stehule
2007/10/24, Peter Manchev [EMAIL PROTECTED]:

 I was thinking about pl/pgsql and comparing it with pl/sql function result 
 cache,
 featured in Oracle 11g - see

 http://www.oracle.com/technology/oramag/oracle/07-sep/o57plsql.html

 Is it possible to get pl/pgsql function result cache functionality into 
 PostgreSQL?

plpgsql doesn't allow access to shared memory now. You can use plper
for caching some resuts. I am not sure if result cache is generally
accaptable technique, but I thing, I can write similar functionality
for orafce

if you need anything hurry, use plperl
http://www.postgresql.org/docs/8.2/interactive/plperl-global.html and
$_SHARED array.

Regards
Pavel Stehule

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org/


Re: [GENERAL] function result cache for pl/pgsql

2007-10-24 Thread Peter Manchev

IMHO, pl/perl;s global hash %_SHARED does not provide the same performance. 

With pl/perl with some data cached we will get getter performance, that is 
sure, but the body of the function will be evaluated anyway, so there will be 
some miliseconds lost. 

On the other hand, the body of a function with in-memory result cache clause 
will not be evaluated if the supplied arguments' result is already cached, and 
the function will just instantly return the result - which is the timesaver. 

So, I would prefer to have such function clause implemented in pgsql, maybe as 
add-on. 

Best,
Peter
_
Peek-a-boo FREE Tricks  Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us
---(end of broadcast)---
TIP 6: explain analyze is your friend


[GENERAL] function result cache for pl/pgsql

2007-10-23 Thread Peter Manchev

I was thinking about pl/pgsql and comparing it with pl/sql function result 
cache,
featured in Oracle 11g - see

http://www.oracle.com/technology/oramag/oracle/07-sep/o57plsql.html

Is it possible to get pl/pgsql function result cache functionality into 
PostgreSQL?

I am not that familiar with the pgsql internals to hack this only by myself.

Best,
Pete

_
Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly