dbms_lob.append [message #486088] |
Mon, 13 December 2010 09:23 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
I am facing one issue. I created one proc and when I call in some time it took 10 minutes and some time it took 2 hrs.
CREATE OR REPLACE PROCEDURE DEVDEFT.pra (p_action in number default null) is
cursor c1 is select distinct uev.actionBy from hclt_temp_mail_record uev;
v1 c1%rowtype;
cursor c0 is
SELECT uev.actionBy,uev.displayinfo from hclt_temp_mail_record uev where uev.actionby=v1.actionby;
vc0 c0%rowtype;
vmail_content_old clob;
vmail_content_new clob;
mail_clob clob;
begin
open c1 ;
loop
fetch c1 into v1;
exit when c1%notfound;
dbms_lob.createtemporary(mail_clob,false,dbms_lob.call);
open c0;
loop
proclog('TESTCLOB','CLOB');
fetch c0 into vc0;
exit when c0%notfound;
vmail_content_new:=null;
vmail_content_new:=vc0.displayinfo;
DBMS_LOB.APPEND(mail_clob, vmail_content_new);
end loop;
close c0;
dbms_lob.freetemporary(mail_clob);
dbms_lob.freetemporary(vmail_content_new);
end loop;
close c1;
END;
BEGIN
PRA;
END;
Please advice me why its behavior in very much inconsistent.
There are 142000 records in hclt_temp_mail_record. Cursor is not slow, its rruning very well, but i think problem is with dbms_lob. Please advice.
|
|
|
|
Re: dbms_lob.append [message #486291 is a reply to message #486272] |
Tue, 14 December 2010 11:44 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
when i comment this line DBMS_LOB.APPEND(mail_clob, vmail_content_new); every time the proc ic complete in 5 moniutes ,but without commening this line and when server is busy with other job then the same proc take hrs to complete.
Yes the stats are upto date.
|
|
|
|
Re: dbms_lob.append [message #486299 is a reply to message #486293] |
Tue, 14 December 2010 12:01 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
do not have any idea because i am using oracle 10g and also cpu uses is very high when use append clause. It works for 142000 records , in starting, process become very fast means in starting 30 minutes it complete 25% records, but for the rest 75% records it took hrs to complete and when we see the cpu utilisation through OEM it shows 100%.
|
|
|
|
Re: dbms_lob.append [message #486302 is a reply to message #486301] |
Tue, 14 December 2010 12:10 |
prashant_ora
Messages: 196 Registered: July 2010
|
Senior Member |
|
|
but my question is whether dbms_lob.append take more cpu in process if we use huge number of records in append,if yes then is there any way to reduce the cpu utilisation.
|
|
|