Debug.Print Now, "test EOF() accomplished ..."
End Sub
3. 运行tt1(),tt2(),tt2(),tt1() 交替一下顺序以避免先后次序对测试的影响, 结果如下
3/29/2009 6:06:21 PM test recordcount started ...
3/29/2009 6:06:32 PM test recordcount accomplished ...
3/29/2009 6:06:35 PM test EOF() started ...
3/29/2009 6:06:41 PM test EOF() accomplished ...
3/29/2009 6:06:46 PM test EOF() started ...
3/29/2009 6:06:52 PM test EOF() accomplished ...
3/29/2009 6:06:55 PM test recordcount started ...
3/29/2009 6:07:06 PM test recordcount accomplished ...
结论: (windows 2000 sp4 + access 2003 sp3, CPU 2GHz, MEM 2GB)
在对10000记录的 1000次循环中
eof 耗时为约 6s, recordcount 耗时为约 11s
则测试结果
3/29/2009 6:07:45 PM test recordcount started ...
3/29/2009 6:07:56 PM test recordcount accomplished ...
3/29/2009 6:08:01 PM test EOF() started ...
3/29/2009 6:08:11 PM test EOF() accomplished ...
3/29/2009 6:08:15 PM test EOF() started ...
3/29/2009 6:08:26 PM test EOF() accomplished ...
3/29/2009 6:08:29 PM test recordcount started ...
3/29/2009 6:08:40 PM test recordcount accomplished ...