微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我最近接手了一个项目,他们有一个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/

原文地址:https://www.jb51.cc/aspnet/248060.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐