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/

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....