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

Home -> Community -> Mailing Lists -> Oracle-L -> Update of Clobs *Performance*

Update of Clobs *Performance*

From: Mike Schmitt <mschmitt_at_uchicago.edu>
Date: Wed, 03 Nov 2004 13:28:40 -0600
Message-Id: <5.2.0.9.2.20041103124651.02f905d0@nsit-imap.uchicago.edu>


Hi all,

I have a developer who is trying to use PL/SQL to update all of the CLOBS of a specific table (nightly basis). I am looking for advice on how to speed up the performance for this process. SQL tracing the process shows the following before I cancel out.

call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ----------

Thanks

Table_A (141,000 rows, no indexes)
tabA_char VARCHAR2(10)
tabA_clob CLOB

Table_B (145,000 rows, no indexes)
tabB_num number
tabB_clob CLOB

Procedure
declare
v_clob varchar2(32500);
v_id varchar(10);

cursor cont_rep_clob is
select tabA_char, tabA_clob
from Table_A;

begin
open cont_rep_clob;
loop
fetch cont_rep_clob into v_id, v_clob;

exit when cont_rep_clob%NOTFOUND;

update Table_B
set tabB_clob = v_clob
where to_char(tabB_num) = v_id;

commit;

end loop;
close cont_rep_clob;

--

http://www.freelists.org/webpage/oracle-l Received on Wed Nov 03 2004 - 13:24:42 CST

Original text of this message

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