sys.allocation_units

compatibility
#compatibility#catalog-view

Description

Contains a row for each allocation unit in the database.

Syntax

p.partition_number,
p.rows,
p.data_compression_desc
FROM sys.partitions
AS p
INNER
JOIN sys.allocation_units
AS au
ON p.partition_id = au.container_id
ORDER
BY
SpaceUsed_MB
DESC
;