min_record_size_in_bytes,
max_record_size_in_bytes,
avg_record_size_in_bytes
FROM SYS.DM_DB_INDEX_PHYSICAL_STATS
(DB_ID('AdventureWorks'),NULL,NULL,NULL,'DETAILED');
GO
sys.dm_db_index_physical_stats – 带有ORDER BY从句的基本SELECT语句
USE AdventureWorks;
GO
SELECT CAST(DB_NAME(DATABASE_ID) AS VARCHAR(20)) AS 'DatabaseName',
CAST(OBJECT_NAME([OBJECT_ID]) AS VARCHAR(20)) AS 'TableName',
index_id,
文章来源于领测软件测试网 https://www.ltesting.net/