CLOB concatenation in storage proc much slower than via anonymous PL/SQL
622002Feb 7 2008 — edited Feb 8 2008Good 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;