投入多少,收获多少;投入多深,领悟多深。太阳底下没有新鲜事,排列组合就是创新。每天多做一点点,就是进步的开始,每天进步一点点,就是成功的开始,每天创新一点点,就是领先的开始。
Named vs Anonymous Pl/sql Blocks testing
上一篇 /
下一篇 2008-04-20 11:56:30
/ 个人分类:ORACLE
1
begin
for i in 1..1000000
loop
begin select object_id into :a from test1 where rownum<2; end;
end loop;
end;
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 145.03 157.67 0 4000238 0 1
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 2 145.03 157.67 0 4000238 0 1
2
begin
for i in 1..1000000
loop
select object_id into :a from test1 where rownum<2;
end loop;
end;
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 144.89 159.03 0 4000238 0 1
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 2 144.89 159.03 0 4000238 0 1
3
BEGIN a; END;
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.03 0.03 0 51 0 0
Execute 1 79.24 91.40 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 2 79.27 91.44 0 51 0 1
/*create procedure a */
create or replace procedure a
is
i number ;
a number ;
begin
for i in 1..1000000 loop
select object_id into a from test1 where rownum<2;
end loop;
end;
/
从中可以看出在完成同样工作的情况下,Anonymous Pl/sql Blocks 性能和Named性能相差很多
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: