加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – SQL Server 2005 – 您应该多久重建一次索引?

发布时间:2020-12-16 04:22:09 所属栏目:asp.Net 来源:网络整理
导读:我最近接手了一个项目,他们有一个SQL作业设置,每三个小时运行一次,重建ASP.NET成员资格数据库表中的索引. 这似乎相当高,每天重建索引8次.我每天大约有2000个新用户,总共约有200万注册用户. 对于正确的索引重建计划,您会建议什么? 解决方法 你的死锁肯定与重
我最近接手了一个项目,他们有一个SQL作业设置,每三个小时运行一次,重建ASP.NET成员资格数据库表中的索引.

这似乎相当高,每天重建索引8次.我每天大约有2000个新用户,总共约有200万注册用户.

对于正确的索引重建计划,您会建议什么?

解决方法

你的死锁肯定与重建索引有关.毫无疑问,这些索引不需要经常重建.至少应该考虑使用ONLINE选项,如果你可以在重建之前保持索引被删除.

这是我们使用的指南:

Index should be rebuilt when index
fragmentation is greater than 40%. Index
should be reorganized when index
fragmentation is between 10% to 40%.
Index rebuilding process uses more CPU
and it locks the database resources.
SQL Server development version and
Enterprise version has option ONLINE,
which can be turned on when Index is
rebuilt. ONLINE option will keep index
available during the rebuilding.

资料来源:http://blog.sqlauthority.com/2007/12/22/sql-server-difference-between-index-rebuild-and-index-reorganize-explained-with-t-sql-script/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读