All I can think of is to pin these functions in the SHARED POOL using
DBMS_SHARED_POOL.KEEP procedure !!
-----Original Message-----
Sent: Friday, May 04, 2001 3:06 PM
To: Multiple recipients of list ORACLE-L
functions?
Oracle : 8.0.5
Platform : Sun
Is there any way to "optimize" the following two functions to improve speed?
I am calling this type of functions a lot.
Thanks.
----------------------------------------
function fTest1 (v_id in number) return boolean is
v_date date;
BEGIN
select max(my_date_field) into v_date from my_table where id= v_id;
if v_date > sysdate - 30 then return true; else return false; end if;
EXCEPTION
when others then return false;
END fTest1;
---------------------------------------
function fTest2 (v_id in number) return varchar2 is
text varchar2(32000);
cursor cur1 is
select my_text_field from my_table where id= v_id;
BEGIN
for x in cur1 loop
text := text || chr(10) || x.my_text_field ;
end loop;
return text;
END fTest2;
----------------------------------------------
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Guang Mei
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Vikas Kawatra
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).