Access开发培训
网站公告
·Access专家课堂QQ群号:151711184    ·Access快速开发平台下载地址及教程    ·欢迎加入Access专家课堂微信群!    ·如何快速搜索本站文章|示例|资料    
您的位置: 首页 > 技术文章 > 综合其它

【译文】5个技巧让你的Access软件提速

时 间:2013-04-23 08:34:22
作 者:周芳   ID:24526  城市:上海
摘 要:我们都遇到过那样的问题。当你需要快速启动ACCESS并且加载你最爱的access应用程序时,而你只看到它像拖动冬天的糖蜜缓慢的时候。试试下面五个技巧来提高你的数据库速度:
正 文:

原作者:Emily Warn 翻译:周芳


【译文】5个技巧让你的Access软件提速 

      我们都遇到过那样的问题。当你需要快速启动ACCESS并且加载你最爱的access应用程序时,而你只看到它像拖动冬天的糖蜜缓慢的时候。试试下面五个技巧来提高你的数据库速度:

1. 确保你所有的表都设置了主键 
       运行一个没有主键的表就像用2个活塞运行一个四冲程的发动机。打开每一个表的设计视图并确保每个都有一个主键。附加点:用一个字段去限制你的主键是为了不去使用多字段。如果不能选定一个字段使用怎么办呢?可以添加一个自动编号字段使它成为主键。

 

2. 通过添加二级索引进行速度优化 
       你有没有发现自己在同一个字段搜索了一遍又一遍?是时候添加一个二级索引了!例如,二级索引OrderDate将大量使用在订单数据库。继续添加更多你需要的索引。(不要在所有的字段里过度的添加二级索引)。


 3. 拆分数据库 
        如果你要在网络上跟其他人分享Access数据库,而且没有将它拆分,那么你必然会遭受到"款待"。使用Access数据库拆分已经很明智。还有一个额外加分点是:把数据文件放在服务器上,复制前端文件到你的用户电脑,你会再次提高速度。


 4. 使用压缩和修复数据库 
        它是我最喜欢的工具,并且我也希望成为你最喜欢的,至少每月使用一次压缩和修复数据库——它是一个好管家。


 5. 只加载你需要的数据 
        当你的应用程序启动时,你真的需要显示自开始以来所有的订单吗?好吧,如果你是管理员,喜欢看到每一条数据的话那也行,但是对于其他使用者来说,需要再考虑下在你的应用程序中哪些数据是有必要加载的,可以使用“where”条件来显示您需要的数据。


【原文】5 tips to make your Access database super-fast

We've all been there. You fire up Access and load your favorite Access app only to see it drag like molasses in winter. Try these five tips to boost the speed of your database:


  1.Make sure all of your tables have primary keys
  Running a table without a primary key is like running a four-cylinder engine with only two active pistons. Open every table in Design view and make sure each has a primary key. Extra points: Limit your primary keys to just one field in order to stay away from using multi-field implementations. Can't settle on which single field to use? Then add an Autonumber field and make it your primary key.



 2.Optimize by adding secondary indexes 
Do you find yourself searching on the same field over and over again? Time to add a secondary index! For example, the secondary index orderDate will be heavily used in an order database. Go ahead and add it and any more of them that you need. (Don't overdo it by adding secondary indexes for all of your fields either). 


  3.Be like an atom and split 
If you are sharing your Access database with other people on a network and haven't split it up yet, you're in for a real treat. Use the Access Database splitter and split that bad boy already. Extra credit: leave the data file on the network and copy the frontend to your user's desktop and you'll increase speed again.


 4.Use Compact and Repair 
Our favorite tool and I hope it becomes your's too! Use Compact and Repair at least once a month--it's just good housekeeping.


  5.Load only what you need 
When your app starts, do you really need to display every order since the beginning of time? Ok, if you're the owner and love to see the bottom line dollars then yes, but for everyone else, reconsider what data you're loading where throughout your app. Get rid of forms that open everything and instead load forms using a "where" clause to show only the data that you need.



Access软件网官方交流QQ群 (群号:483923997)       Access源码网店

常见问答:

技术分类:

相关资源:

专栏作家

关于我们 | 服务条款 | 在线投稿 | 友情链接 | 网站统计 | 网站帮助