欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [原创]数据库与全局变量读写性能测试

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有6503人关注过本帖平板打印复制链接

主题:[原创]数据库与全局变量读写性能测试

帅哥哟,离线,有人找我吗?
z7c9
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
[原创]数据库与全局变量读写性能测试  发帖心情 Post By:2011/1/13 18:15:27    Post IP:114.241.165.204[只看该作者]

以下内容为程序代码:

1 runmode:1;
2
3 starttime:=timetot0(currenttime);
4
5 for i=1 to 5000 do begin
6     extgbdataset(numtostr(i,0),i);
7 end
8
9 endtime:=timetot0(currenttime);
10
11 msgout(1,'extgbdata write time : '+numtostr(endtime-starttime,0));
12

 

 

以下内容为程序代码:

1 runmode:1;
2
3 starttime:=timetot0(currenttime);
4
5 for i=1 to 5000 do begin
6     debugfile('c:\extgbdata.txt',numtostr(extgbdata(numtostr(i,0)),0),0);
7 end
8
9 endtime:=timetot0(currenttime);
10
11 msgout(1,'extgbdata write time : '+numtostr(endtime-starttime,0));

 

 

以下内容为程序代码:

1 runmode:1;
2
3 starttime:=timetot0(currenttime);
4
5 database('provider=microsoft.jet.oledb.4.0;data source=test.mdb');
6
7 for i=1 to 5000 do begin
8     sql:='insert into test(key1,value1) values("'+numtostr(i,0)+'",'+numtostr(i,0)+')';    
9     dbexecute(sql);
10 end
11
12 endtime:=timetot0(currenttime);
13
14 msgout(1,'database write time : '+numtostr(endtime-starttime,0));
15

 

 

以下内容为程序代码:

1 runmode:0;
2
3 starttime:=timetot0(currenttime);
4
5 database('provider=microsoft.jet.oledb.4.0;data source=test.mdb');
6
7 for i=1 to 5000 do begin
8     sql:='select * from test where key1='+numtostr(i,0);    
9     msgout(1,sql);
10     dbtable2(sql);
11     value:=dbvalue('value1');    
12     debugfile('c:\database.log',numtostr(value,0),0);
13 end
14
15 endtime:=timetot0(currenttime);
16
17 msgout(1,'database write time : '+numtostr(endtime-starttime,0));
18


 回到顶部