Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL question: possible to improve performance in these functi

RE: SQL question: possible to improve performance in these functi

From: Vikas Kawatra <VKawatra_at_innoventry.com>
Date: Fri, 04 May 2001 17:10:44 -0700
Message-ID: <F001.002F9FF2.20010504162047@fatcity.com>

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: zlmei_at_hotmail.com

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: ListGuru_at_fatcity.com (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: VKawatra_at_innoventry.com
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: ListGuru_at_fatcity.com (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). Received on Fri May 04 2001 - 19:10:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US