MSAccess的探查器 [英] Profiler for MSAccess

查看:91
本文介绍了MSAccess的探查器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用SQL Server支持的MSAccess .mdb文件. 当我尝试打开一个表单时,需要很长时间才能显示 我知道我在Form的加载事件中有东西.

I have a MSAccess .mdb file backed with sql server. When i am trying to open a form ,It takes a long time to display I know i had stuff on load event of Form.

是否可以像SQL Profiler一样跟踪MSAccess中的执行时间?

Is there any way to track execution time in MSAccess like SQL Profiler?

推荐答案

Faheem; 我从未见过这样的跟踪软件.

Faheem; I have never seen such tracking software.

一种简单的守旧派"方法: 在每个函数调用的末尾放置一个msgBox. 一旦确定了哪个功能的运行时间比预期的要长,请检查该功能.您的记录集是否使用索引字段?避免同时打开多个记录集.您要尽量减少使用Loops吗?您的循环优化了吗?

A simple, 'old school' method: Place a msgBox at the end of each function call. Once you have isolated which function is running longer than expected, examine the function. Are your recordsets utilizing indexed fields? Avoid opening multiple recordsets simultaneously. Are you minimizing the use of Loops? Are your loops optimized?

要检查的另一件事是使用Access宏来计算聚合(总和,平均值). 这将导致Access重复运行单个查询.如果您遇到的情况是要处理超过100,000条记录和2打列,则Access宏将被触发2打次数(每列一次).

Another thing to check is the use of Access macros to calculate Aggregates (sums, averages). This causes Access to run individual queries repeatedly. If you had a situation where you were dealing with more than 100,000 records and 2 dozen columns, the Access macros would fire 2 dozen times(once for each column).

使用上面概述的方法,我使用了一个大小合适的DB Warehouse应用程序(主数据表中有0.25万条记录,共40列),精简了报告,耗时一个小时才能处理5秒钟.客户很高兴.

Using the methods outlined above I have taken a good-sized DB Warehouse app (.25 million records in main Data table, 40 columns) and streamlined reports taking an hour to process down to 5 seconds. The client was very happy.

这篇关于MSAccess的探查器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆