?? SQL ????? ??????? ??????? ???? ??????????? ?????????????? ?? SQL ?????? ??????????? ?? ?? ???? ??

???? ?????? ???? ??????
???? ID: 2755960 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

????????????? Microsoft SQL ????? ??????? ??????? ??? ???? ?????? ???? ???, ?? SQL ?????? ??????????? ?? ?? ???? ??? ?? ?????????? ?????? ?? ??? ??????????? ?????????????? ?? ??? ????? ?? ??? sys.dm_db_index_physical_stats ?????? ??????? ?? ????? ?? ???? ???:
  • ?? ????? ???????????
  • ??? ??????????? ' % ws ' ?? ?? ??????
  • ??? ??????????? ' % ws ' ?? ??? ?????????? ?????
  • ???? ??????? ??? ??? ???????????
  • ??? ??????? ??? ??? ???????????
?????????????? 30 ??????? ?? ???? ?? ?? ?? ????????? ???? ?? ???, ????? SQL ?????? ????????? ?????:

SELECT OBJECT_NAME(i.OBJECT_ID) AS TableName, OBJECT_NAME(i.OBJECT_ID) AS TableName, i.name AS IndexName,i.name AS IndexName, indexstats.avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') indexstats INNER JOIN sys.indexes i ON i.OBJECT_ID = indexstats.OBJECT_ID WHERE indexstats.avg_fragmentation_in_percent > 30 AND i.index_id = indexstats.index_id
?????????????? ?? ??? ???? ?? ??? ??????? ?????? ?? ???????? ???? ?? ???, ?????????? ????-????????? ?? ?????:
  • ?? ????? ???????? ??????????? ???: ??????? ?? (?????? ???? =) * 30 ??????? ?? ???? ?? ????? ??? ??????? ?????????????? ?????????? ?? ??? command.
  • ????? ??? ??????? ?????????????? ?? 5 ???? ?? ??? 30 ??????? ?? ??? ?????????? ?? ??? ???????? ??? ??????????? ???? ?? ????? ?????

?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
avg_fragmentation_in_percent ????????????? ???
> 5% ??< ==""> ALTER ??????????? REORGANIZE
> 30 %??????????? REBUILD ?? ???????? (?????? ???? =) *
???:
  • ?? ????? ?? ?? ????? ?? ?? ??????????? ???????? ??? ?? ??????????? ???: ?????????? ??? ????? ???? ????? ?? ???????? ?? ??? ?? rough ??????????? ?????? ????? ?????, ???????? ????? ?? ????? ?? ????? ??? ??? ?? ???? ??? ?? ???? ?????? ?? ??? ??????? ????????? ????????? ???? ?? ??? experiment ??????
  • ?????????????? (?? ?? ???? ???????) ?? ???? ?? ???? ?? ?? ?? ????????? ?? ?????? ??????? ???? ?? ???? ????? ????? ??? ????? ?? ??????? ??? ?? ???? ?????? ?? ?????????????? ?? ??????? ?? ??? ??? ????? ?? ?? ??? ???? ???? ?? ?????????????? ?? rebuilding ??????????? ?????? outweighed ???

???? ???????

??????? ?? ??????????? ???: ??????? ???? ???? ?? ???? ??? ???? ??????? ?? ???, ????? Microsoft ??? ???? ?? ????:
??????? ?? ??????????? ???: ??????? ???? ?? ??? ????

????? ?????? ?? ???? ?? SQL Server ?? ???? ??????? ?? ????? ??????? ???? ?????????? ?? SQL ????? ?????? ?? ??????? ?? ??? ???????? ??? ?? ???? ????? ?? ???????? ?? ???? ??? ???? ??????? ?????? ???? ???
?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
???? ?????????????? ?????????? ?? ??????????? ??????? ????? ??????? ???? ?????????? ??
?????? ?????? ??????????? fragmentations SQL ????? ?????? ???????? downgrade ?? ???? ???????? ?????? ??????? ?????? ??????? ?????????????? ?? ????? ???? ??? avg_fragmentation_in_percent ??? ??? sys.dm_db_index_physical_stats ???????? SQL ????? ??????? ??????? ??????????? ?? ???? ??? ?????????????? ??????????? ?? ??? ?? ??? ???? ??????? ?? ???? ??, ?? ?? ??????? ??????? ???? ??? ???? ??????????? fragmentations ???? ?? ??? ??????? ???????? ?? ?? ???? ?? ??? ?? ???? ?? ??? ???? ???????? ?? ???? ?????SQL Server 2008

SQL ????? 2008 R2

SQL Server 2012

???

???? ID: 2755960 - ????? ???????: 27 ??????? 2012 - ??????: 1.0
???? ???? ???? ??:
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Express
  • Microsoft SQL Server 2012 Web
??????: 
kbsurveynew kbhowto kbexpertiseadvanced kbmt KB2755960 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:2755960

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

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com