Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Update of Clobs *Performance*
Even better, just commit once at the end...
-----Original Message-----
From: Mark W. Farnham [mailto:mwf_at_rsiz.com]=20
Sent: Wednesday, November 03, 2004 3:00 PM
To: oracle-l_at_freelists.org
Subject: RE: Update of Clobs *Performance*
create index why_full_scan_all_my_clobs_for_each_one_row_update on tableB(tabB_num)
change your where clause to where tabB_num =3D to_number(v_id)
Think about a commit counter within the loop less than the entire table. Maybe 1000 or 10000?
Regards,
mwf
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Mike Schmitt
Sent: Wednesday, November 03, 2004 2:29 PM
To: oracle-l_at_freelists.org
Subject: Update of Clobs *Performance*
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 =3D v_clob
where to_char(tabB_num) =3D v_id;
commit;
end loop;
close cont_rep_clob;
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 03 2004 - 14:00:35 CST
![]() |
![]() |