MSSQL TABLE INDEX SEARCH 테이블 인덱스 조회
MSSQL TABLE INDEX SEARCH MSSQL 테이블 인덱스 조회 SELECT DB_NAME() AS DatabaseName , OBJECT_NAME(S.OBJECT_ID) AS TableName , I.NAME AS IndexName , ROUND(AVG_FRAGMENTATION_IN_PERCENT, 2) AS Fragmentation FROM SYS.DM_DB_INDEX_PHYSICAL_STATS(DB_ID(),NULL,NULL,NULL,NULL) AS S INNER JOIN SYS.INDEXES AS I ON S.OBJECT_ID = I.OBJECT_ID AND S.INDEX_ID = I.INDEX_ID WHERE S.DATABASE_ID = DB_ID('DB_Name') -- 현재 데이터..
2022.01.07