- 最后登录
- 2016-8-16
- 在线时间
- 147 小时
- 威望
- 207
- 金钱
- 2622
- 注册时间
- 2011-10-31
- 阅读权限
- 60
- 帖子
- 170
- 精华
- 0
- 积分
- 207
- UID
- 75
|
3#
发表于 2012-1-9 13:18:28
测试环境:
服务器:vbox4.1.8+windows2003+oracle 10gr1
客户端:instant client 10.2.0.5
测试脚本:
D:\>sqlplus system/test@test
SQL*Plus: Release 10.2.0.5.0 - Production on Mon Jan 9 11:42:25 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> desc gtlions;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(22)
每次测试之前执行如下匿名块脚本:
Declare
a number:=1;
Begin
Loop
Insert Into gtlions(Id) Values(a);
If Mod(a,100)=0 Then
Update gtlions Set Id=0;
Commit;
End If;
If Mod(a,1000)=0 Then
Execute Immediate 'truncate table gtlions';
End If;
a:=a+1;
End Loop;
End;
/ |
|