????? ???? ??????? SQL ????? ???? ???? ????? ?????? SQL Server ?????? ???? ????

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

??????

????? ???? ??????? SQL ??? ??? ??? ????? ??????? ???? ???? ?? ???? ????? ?????? Microsoft SQL Server. ????? ??????? ?????? ?????? sys.dm_db_index_physical_stats ????? ?? ????? ?????? ?? ??????? ???????:
  • ???? ????
  • ???? ??????? ?? ????
  • ???? ??????? ??? ????? ??? ??????
  • ???? ??????? ?? ????? ??????
  • ???? ??????? ?? ???? ????? ????????
?????? ????? ???? ?? 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
?????? ???? ????? ?????? ???????? ???? ????????? ???????:
  • ??????? "????? ???? ????? ???? ??" (= ON ??? ????????) * ????? ???????? ???? ????? ???? ????? ???? ?? 30%.
  • ??????? ????? ????? ????? ???? ???????? ???? ????? ???? ????? ??? 5 ??? 30 ?? ??????.

?? ??? ??????????? ??? ??????
???? avg_fragmentation_in_percent???? ??????
> 5% ?< ==""> ????? ???? ALTER
> 30 %????? ????? ????? ???? ???????? (= ON ??? ????????) *
?????????:
  • ???? ??? ????? ????? ????? ?????? ?????? ???? ??? ??????? ??? ????? ????? ???? ????? ? ????? ????? ???? ??????. ??? ???? ?? ????? ????? ??????? ?? ???? ??? ????. ??? ?? ????? ????? ?????? ???? ?????? ?????? ??.
  • ??????? ?????? ???? (??? ?? ???? ???????) ??????? ?? ????? ??? ?? ???? ???????. ???? ??? ???? ??? ?? ???? ???? ??????? ?? ????? ????? ???? ?? ????? ??????? ?????? ????? ?? ????? ????? ???????.

??????? ????

????? ?? ????????? ??? ????? ????? ????? ?????? ????? ???????? ????? ??? ???? Microsoft ?????? ??? ???:
????? ????? ????? ?????? ????? ???????

???? ?????? ?????? ???? ?? ????????? ??? ???????? ?? ????? ?????? ?? ???? ??? ????? ??? ???? SQL Server ?????????? ?????? SQL Server ???? ??? ????? ??????? ????????.
?? ??? ??????????? ??? ??????
?????? ???????????? ?????????? ?????????????? ???????? ???? ??? ????? ???????
?????? ???? ???????????? ????? ????? SQL Server ?? ???? ?? ???? ????????????? ???? ???? ?????? ?? ????? ?????? ???????? avg_fragmentation_in_percent ?????? ?? sys.dm_db_index_physical_stats ??? ???? ???? ????? ?????? SQL Server. ??? ???? ??????? ????? ????? ?? ???? ??????? ??????? ???? ?? 5%? ??? ????? ??? ???????. ???? ????????? ?? ??? ??????? ??? ??????? ???????? ??????? ????? ???? ?????.SQL Server 2008

SQL Server 2008 R2

???? SQL 2012

???????

???? ???????: 2755960 - ????? ??? ??????: 11/?? ??????/1433 - ??????: 1.0
????? ???
????? ??????: 
kbsurveynew kbhowto kbexpertiseadvanced kbmt KB2755960 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????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