Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Function slows the select
<SPAN
class=623015014-28062001>Hi
<SPAN
class=623015014-28062001>
Try
replacing
<SPAN
class=623015014-28062001>
GetSid
<SPAN
class=623015014-28062001>
<SPAN
class=623015014-28062001>with
<SPAN
class=623015014-28062001>
<SPAN
class=623015014-28062001>(select SYS_GUID() from dual)
<SPAN
class=623015014-28062001>
in the
update statement, ie don't use a function.
<SPAN
class=623015014-28062001>
Or
use
<SPAN
class=623015014-28062001>
<SPAN
class=623015014-28062001>DECLARE
<SPAN
class=623015014-28062001>vGetSid Varchar2(4000);
<SPAN
class=623015014-28062001>BEGIN
select
SYS_GUID() into GetSid from dual;
<SPAN
class=623015014-28062001>
<FONT
size=2> Update UpdateTable<FONT
size=2>--Varosokat updatel
Set UpdateTable_Column1=
--<FONT
size=2> ( Select distinct 'Some string
) Where UpdateTable_Column2 Is
<FONT face=Tahoma
size=2>-----Original Message-----From: Csillag Zsolt
[mailto:starsoft_at_interware.hu]Sent: Wednesday, 27 June 2001
12:20To: Multiple recipients of list ORACLE-LSubject:
Function slows the selectHi,In the
following select statement I have a function "GetSid" that slows theupdate
for hours even if the Link_keszit updatable table consists of a few
rows. Update UpdateTable<FONT color=#ff0000
size=1>--Varosokat updatel
Set UpdateTable_Column1=
--<FONT
size=1> ( Select distinct 'Some string
) Where UpdateTable_Column2 Is