alter system set shared_pool_size=600M; --修改shared pool大小
select * from v$sysstat where name='parse count (hard)';
alter system set cursor_sharing='exact';
as
begin
for i in 1..100000
loop
execute immediate
'insert into m values(:x)' using i;
end loop;
end;
/
as
begin
for i in 1..100000
loop
execute immediate
'insert into m values('||i||')';
end loop;
end;
/
@>exec proc2;
PL/SQL procedure successfully completed.
Elapsed: 00:00:15.28
@>select count(*) from m;
COUNT(*)
----------
100000
Elapsed: 00:00:00.01
@>truncate table m;
Table truncated.
Elapsed: 00:00:00.39
@>exec proc1;
PL/SQL procedure successfully completed.
Elapsed: 00:00:05.21