1、首先就是收缩数据库,主要对文件进行收缩
2、重建索引
USE ufdata_112_2011;
DECLARE @name varchar(100);
DECLARE authors_cursor CURSOR FOR Select name from sysobjects where xtype='u' order by id;
OPEN authors_cursor
FETCH NEXT FROM authors_cursor INTO @name
WHILE @@FETCH_STATUS = 0 BEGIN
DBCC DBREINDEX (@name, '', 90)
FETCH NEXT FROM authors_cursor INTO @name END
deallocate authors_cursor
效果还是比较明显的,47G的数据,缩小到6G多。
来源:CSDN
作者:rslwf
链接:https://blog.csdn.net/rslwf/article/details/104141374