Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

CLOB concatenation in storage proc much slower than via anonymous PL/SQL

622002Feb 7 2008 — edited Feb 8 2008
Good day!
It seems, I do the same via pl/sql block and storage procedure, but running time is critically varies.
Did anybody faced against that problem ?

Your early reply will be very much appreciated.

Platform Microsoft Windows 2000
Product Oracle SE, 11.1.0.6.0

declare
c_buf clob;
d_buf clob;
l_loop_count int := 64000;
begin
for i in 1 .. l_loop_count - 1
loop
c_buf := c_buf || 'X';
d_buf := d_buf || 'Y';
end loop;
end;
-- Done in 3,157 sec

begin
clob_tst(64000);
end;
-- Done 36,531 sec


create or replace procedure clob_tst(i_loop_count int) is
c_buf clob;
d_buf clob;
begin
for i in 1 .. i_loop_count - 1
loop
c_buf := c_buf || 'X';
d_buf := d_buf || 'Y';
end loop;
end clob_tst;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2008
Added on Feb 7 2008
14 comments
2,113 views