????????

????SQLServer??????????洢?????SP_Configure?????????????????????????á????????????????????????????????????????????????????÷?????????????????????????????????32λ??64λ???У?sp_configure?????Щ????

???????????????SQLServer?????????????????????IIS????????????????????????Щ?????????????Щ?????????????????????????????譚???á?

????????????????????

????1???SQLServer???????????????
????2??32λ??64λ???е???????á?
????3??????“????????????”??
????4?????SQLServer????????á?

????????SQLServer????????????????

??????????????????????????????????????????????????????????????????????????????CPU???????

????????????θ?Ч?????????????????????????????????ЧCPU??SQLServer?л???????????????????????CPU?????????????????????е??Χ?????????????????????????CPU???????????????Ч??

????????????????SQLServer?????в???????????????CPU???????????????????????????CPU?????SQLServer???????????????????????????SQLServer????????????????????

?????????????

?????????????????????????????????ж????CPU????????????SQLServer??DMV??sys.dm_os_sys_info???????????????????DMV????????????????????????????????????

SELECT  cpu_count AS 'Cores' ??--???CPU????
        hyperthread_ratio --???????CPU???????????????????
FROM    sys.dm_os_sys_info

???????裺

????1???????????????????????в????????CPU????????????????

--0??????
sp_configure 'max degree of parallelism'?? 0
RECONFIGURE WITH OVERRIDE
GO

????2??????伶??????ò??ж????????????hint?????????????SETSTATISTICS TIME?????????????ж?????

SET STATISTICS TIME ON
SELECT  *
FROM    Sales.SalesOrderDetail
OPTION  ( MAXDOP 1 )
SET STATISTICS TIME OFF
GO

SET STATISTICS TIME ON
SELECT  *
FROM    Sales.SalesOrderDetail
OPTION  ( MAXDOP 0 )
SET STATISTICS TIME OFF
GO