Métadonnées du partitionnement



Quelles sont mes tables ou index partitionnés ? Comment sont-ils partitionnés ? Voici une requête qui détaille les éléments du partitionnement…

Voici une requête qui vous donne toutes ces informations :

SELECT s.name AS TABLE_SCHEMA, o.name AS TABLE_NAME, i.name AS INDEX_NAME, f.name AS PARTITION_FUNCTION, ps.name AS PARTITION_SCHEMA, p.partition_number AS PART_NUM, fg.name AS FILE_GROUP, rows AS ROW_COUNT, SUM(dbf.size) OVER(PARTITION BY fg.name) AS PAGE_COUNT, au.total_pages AS USED_PAGES, CASE boundary_value_on_right WHEN 1 THEN ‘RIGHT’ ELSE ‘LEFT’ END AS RANGE, rv1.value AS LOW_VALUE, rv2.value AS HIGH_VALUE FROM sys.partitions p JOIN sys.indexes i ON p.object_id = i.object_id AND p.index_id = i.index_id JOIN sys.objects AS