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

Home -> Community -> Usenet -> c.d.o.server -> Need PL/SQL suggestion

Need PL/SQL suggestion

From: Greg Akins <insomniaNOinSPAM_at_a1usa.net.invalid>
Date: Tue, 05 Oct 1999 10:29:18 -0700
Message-ID: <05043480.94cc796f@usw-ex0108-057.remarq.com>


My company had a stored procedure which did simply:

begin
  delete from members ;
  insert into members (select * from members_at_dblink2) ; end ;

I thought that the following would execute faster. begin
  for Mrecord in (select * from members_at_dblink2) loop    insert into members values (mrecord.*) ;    counter := counter + 1 ;
   if counter > 1000 then

     commit ;
     counter := 0 ;

   end if ;
  end loop ;
end ;

While it may be a bit faster it still creeps.

However, using SQL*Plus copy command flys, at least twice as fast.

However, I can't use SQL*Plus commans in a stored procedure.

Does anybody have any suggestion for replicating the speed of the 'copy' command.

-greg

Received on Tue Oct 05 1999 - 12:29:18 CDT

Original text of this message

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