--微信号:wuyongsoftware 邮箱:wuyongsoftware@163.com
--1.Enterprise Edition (64-bit)
SELECT SERVERPROPERTY("Edition")
--2.Microsoft SQL Server 2014 - 12.0.2000.8 (X64) Feb 20 2014 20:04:26 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.3 (Build 9600: )
SELECT @@VERSION
--3.调整最大并行度,建议修改为1,也可在数据库直接执行,修改方法如下:
sp_configure "show advanced options", 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure "max degree of parallelism", 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
--4.调整针对即席工作负荷进行优化=True,也可在数据库直接执行,修改方法如下:
sp_configure "show advanced options", 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure "Optimize for Ad hoc Workloads", 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
--5.逻辑扫描碎片=35.85%大于30%,我们认为该数据库的索引碎片较多,影响到查询性能,建议重建索引和更新统计信息。
DBCC SHOWCONTIG(&#