Hi
 
Try replacing
 
GetSid
 
with
 
(select SYS_GUID() from dual)
 
in the update statement, ie don't use a function.
 
Or use
 
DECLARE
vGetSid Varchar2(4000);
BEGIN
select SYS_GUID() into GetSid from dual;
 
 Update  UpdateTable--Varosokat updatel
   Set UpdateTable_Column1=
                                                      --
      (
        Select distinct  'Some string here'||vGetSid||UpdateTable_Column2||Logo.Logo_Filenev
        
         From VarosTorzs,Logo, Link_keszit
        
        
Where
          logo_varos_unique_az  = link_keszit_varos_az
         
          and logo.logo_azonosito1= 'KKEPX' and logo.logo_azonosito2= '20200'
         
          and logo_varos_unique_az  = varos_unique_azonosito
      
           )
        
     Where UpdateTable_Column2 Is Not Null ;
END;
 
HTH
Greg
-----Original Message-----
From: Csillag Zsolt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 27 June 2001 12:20
To: Multiple recipients of list ORACLE-L
Subject: Function slows the select

Hi,

In the following select statement I have a function "GetSid" that slows the
update for hours even if the Link_keszit updatable table consists of a few rows.

 Update  UpdateTable
--Varosokat updatel
   Set UpdateTable_Column1=
                                                     
--
      (
        Select distinct  'Some string here'||GetSid||UpdateTable_Column2||Logo.Logo_Filenev
        
         From VarosTorzs,Logo, Link_keszit
        
         Where
          logo_varos_unique_az  = link_keszit_varos_az
         
          and logo.logo_azonosito1=
'KKEPX' and logo.logo_azonosito2= '20200'
         
          and logo_varos_unique_az  = varos_unique_azonosito
      
           )
        
     Where UpdateTable_Column2 Is Not Null ;

The GetSid function is:

CREATE OR REPLACE Function GetSid Return VarChar2 AS
 BEGIN
   return(SYS_GUID());
 END GetSid;


So the problem is that _with_ GetSid function it takes many hours instead of a few minutes.


Thank you in advance

Zsolt Csillag,
Hungary

Reply via email to