Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Package performance.
On a 7.2.2 version of Oracle, HPUX 9.x I have a package that
contains a function to convert currency based on values
stored in a table. The currency_trans table consists of a
currency_code, date and exchange_rate.
The function is as follows:
function convert( cCurrencyType in varchar2, nUSDollar in number,
dYYMM in varchar2 )return number IS
Return nUSDollar;
end if;
begin
--
This is fine for 1 or two records, but when I run a query that either returns 1000's of records, or rolls up 1000's of records, the speed of the system slows to a crawl and CPU usage gets pegged. If I pass 'UD' as my currency code, it is very fast again. The currency_trans table only has 81 records in it.
Any suggestions would be greatly appreciated.
Thanks.
Michael Received on Wed Sep 23 1998 - 16:21:19 CDT