优化只读sql数据库的技巧 [英] tips for optimizing a read-only sql database
本文介绍了优化只读sql数据库的技巧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个中型SQL Server 2008数据库,其中包含精算数据.它的所有用例都是只读查询.在这种情况下,我应该考虑任何特殊的优化吗?还是应该只遵循优化数据库的一般规则?
I have a mid-sized SQL Server 2008 database that has actuarial data in it. All of the use cases for it are read-only queries. Are there any special optimizations I should consider given this scenario? Or should I just stick with the normal rules for optimizing a database?
推荐答案
一种策略是将只读文件组添加到数据库中,并将只读表放在此处.只读文件组允许SQL Server进行许多优化,包括消除所有锁之类的事情.
One strategy is to add a readonly filegroup to your DB, and put your readonly tables there. A readonly filegroup allows SQL Server to make a number of optimizations, including things like eliminating all locks.
除了标准的数据库优化:
In addition to standard DB optimization:
- 确保所有表和索引的碎片都为零
- 考虑添加因更新成本过高而可能避免的索引
这篇关于优化只读sql数据库的技巧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文