File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
QueryTemplates/Common Scripts Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -47,3 +47,31 @@ ORDER BY
47
47
ObjectName,
48
48
IndexID,
49
49
PartitionNumber;
50
+
51
+
52
+
53
+
54
+ -- non-partitioned tables/indexes
55
+ SELECT
56
+ SCHEMA_NAME(o .schema_id ) AS SchemaName,
57
+ OBJECT_NAME(p .object_id ) AS ObjectName,
58
+ i .name AS IndexName,
59
+ p .index_id AS IndexID,
60
+ p .partition_number AS PartitionNumber,
61
+ fg .name AS FileGroupName,
62
+ p.[rows] AS Rows,
63
+ p.[data_compression_desc] AS [Compression]
64
+ FROM sys .partitions AS p
65
+ JOIN sys .indexes AS i
66
+ ON i .object_id = p .object_id
67
+ AND i .index_id = p .index_id
68
+ JOIN sys .data_spaces AS ds
69
+ ON ds .data_space_id = i .data_space_id
70
+ JOIN sys .filegroups AS fg
71
+ ON fg .data_space_id = i .data_space_id
72
+ WHERE
73
+ OBJECTPROPERTY(p .object_id , ' ISMSShipped' ) = 0
74
+ ORDER BY
75
+ ObjectName,
76
+ IndexID,
77
+ PartitionNumber;
You can’t perform that action at this time.
0 commit comments