You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Examples: [!INCLUDE[ssSDW](../../includes/sssdw-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
51
51
The following example joins the **sys.pdw_nodes_column_store_row_groups** table to other system tables to return information about specific tables. The calculated `PercentFull` column is an estimate of the efficiency of the row group. To find information on a single table remove the comment hyphens in front of the WHERE clause and provide a table name.
52
52
53
-
```
53
+
```sql
54
54
SELECTIndexMap.object_id,
55
55
object_name(IndexMap.object_id) AS LogicalTableName,
ORDER BY object_name(i.object_id), i.name, IndexMap.physical_name, pdw_node_id;
75
76
```
76
77
77
78
The following [!INCLUDE[ssSDW_md](../../includes/sssdw-md.md)] example counts the rows per partition for clustered column stores as well as how many rows are in Open, Closed, or Compressed Row groups:
78
79
79
-
```
80
+
```sql
80
81
SELECT
81
82
s.nameAS [Schema Name]
82
83
,t.nameAS [Table Name]
@@ -86,14 +87,16 @@ SELECT
86
87
,SUM(CASE WHEN rg.State=2 THEN rg.Total_Rows ELSE 0 END) AS [Rows in Closed Row Groups]
87
88
,SUM(CASE WHEN rg.State=3 THEN rg.Total_Rows ELSE 0 END) AS [Rows in COMPRESSED Row Groups]
88
89
FROMsys.pdw_nodes_column_store_row_groups rg
89
-
JOIN sys.pdw_nodes_tables pt
90
-
ON rg.object_id = pt.object_id AND rg.pdw_node_id = pt.pdw_node_id AND pt.distribution_id = rg.distribution_id
0 commit comments