The first one:
Sys.indexs Each heap has a row with the index on it.
The second one:
Sys.partitions returns one row per heap with each partition of the index. Each table can have a maximum of 1000 extents.
The third one:
Sys. Allocation_units a set of special types of pages in a partition is called an allocation unit. (Inline data page, row overflow page, large object data page)
--------------------------------------------------------------------------------------------------------------- -----------------------
There can be more than one table in a partition, so Sys.partitions has a one-to-many relationship with Sys.indexs. So you can put two unions on a object_id,index_id column.
----------
A partition can contain multiple (three) allocation units so sys.partitions has a one-to-many relationship with Sys.allocation_units.
SYS.ALLOCATION_UNITS.CONTAINER_ID refers to sys.partitions.partition_id, which means they can be combined with these two columns.
Some important views of SQL Server 1