Ниже вы можете найти запрос с дополнительной информацией
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT
CASE WHEN FG.Name IS NULL THEN DS.Name ELSE FG.Name END AS 'FileGroupName'
,DB_NAME() AS 'DatabaseName'
,OBJECT_SCHEMA_NAME(P.OBJECT_ID) AS 'Schema'
,OBJECT_NAME(P.OBJECT_ID) AS 'TableName'
,CASE WHEN P.index_id = 0 THEN 'HEAP' ELSE I.name END AS 'IndexName'
,CASE WHEN P.index_id IN (0,1) THEN 'data' ELSE 'index' END AS 'Type'
,P.partition_number AS 'PartitionNumber'
,CAST(P.reserved_page_count * 0.008 AS NUMERIC(18,2)) AS 'ReservedSize_MB'
,CAST(P.used_page_count * 0.008 AS NUMERIC(18,2)) AS 'UsedSize_MB'
,P.row_count AS 'RowCount'
FROM
sys.dm_db_partition_stats P
INNER JOIN sys.indexes I ON I.OBJECT_ID = P.OBJECT_ID AND I.index_id = P.index_id
INNER JOIN sys.data_spaces DS ON DS.data_space_id = I.data_space_id
LEFT OUTER JOIN sys.filegroups FG ON FG.data_space_id = DS.data_space_id
WHERE
OBJECTPROPERTY(p.OBJECT_ID, 'ISMSSHipped') = 0
ORDER BY ReservedSize_MB DESC
Ниже вы можете найти запрос с подробной информацией о секционированных таблицах
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SELECT
DB_NAME() AS 'DatabaseName'
,OBJECT_NAME(p.OBJECT_ID) AS 'TableName'
,p.index_id AS 'IndexId'
,CASE
WHEN p.index_id = 0 THEN 'heap'
ELSE i.[name]
END AS 'IndexName'
,sp.data_compression_desc
,p.partition_number AS 'PartitionNumber'
,prv_left.[value] AS 'LowerBoundary'
,prv_right.[value] AS 'UpperBoundary'
,CASE
WHEN fg.[name] IS NULL THEN ds.[name]
ELSE fg.[name]
END AS 'FileGroupName'
,CAST(p.used_page_count * 0.0078125 AS numeric(18,2)) AS 'UsedPages_MB'
,CAST(p.in_row_data_page_count * 0.0078125 AS numeric(18,2)) AS 'DataPages_MB'
,CAST(p.reserved_page_count * 0.0078125 AS numeric(18,2)) AS 'ReservedPages_MB'
,p.row_count AS 'RowCount'
,CASE
WHEN p.index_id IN (0, 1) THEN 'data'
ELSE 'index'
END 'Type'
FROM
sys.dm_db_partition_stats p
INNER JOIN sys.indexes i ON i.OBJECT_ID = p.OBJECT_ID
AND i.index_id = p.index_id
INNER JOIN sys.partitions sp ON p.[partition_id] = sp.[partition_id]
INNER JOIN sys.data_spaces ds ON ds.data_space_id = i.data_space_id
LEFT OUTER JOIN sys.partition_schemes ps ON ps.data_space_id = i.data_space_id
LEFT OUTER JOIN sys.destination_data_spaces dds ON dds.partition_scheme_id = ps.data_space_id
AND dds.destination_id = p.partition_number
LEFT OUTER JOIN sys.filegroups fg ON fg.data_space_id = dds.data_space_id
LEFT OUTER JOIN sys.partition_range_values prv_right ON prv_right.function_id = ps.function_id
AND prv_right.boundary_id = p.partition_number
LEFT OUTER JOIN sys.partition_range_values prv_left ON prv_left.function_id = ps.function_id
AND prv_left.boundary_id = p.partition_number - 1
WHERE
OBJECTPROPERTY(p.OBJECT_ID, 'ISMSSHipped') = 0
ORDER BY 2,3,5