@@ -25,16 +25,21 @@ When creating an ordered CCI, the SQL Analytics engine sorts the existing data i
25
25
To check the segment ranges for a column, run this command with your table name and column name:
26
26
27
27
``` sql
28
- SELECT o .name , pnp .index_id , cls .row_count , pnp .data_compression_desc , pnp .pdw_node_id ,
29
- pnp .distribution_id , cls .segment_id , cls .column_id , cls .min_data_id , cls .max_data_id , cls .max_data_id - cls .min_data_id as difference
28
+ SELECT o .name , pnp .index_id ,
29
+ cls .row_count , pnp .data_compression_desc ,
30
+ pnp .pdw_node_id , pnp .distribution_id , cls .segment_id ,
31
+ cls .column_id ,
32
+ cls .min_data_id , cls .max_data_id ,
33
+ cls .max_data_id - cls .min_data_id as difference
30
34
FROM sys .pdw_nodes_partitions AS pnp
31
35
JOIN sys .pdw_nodes_tables AS Ntables ON pnp .object_id = NTables .object_id AND pnp .pdw_node_id = NTables .pdw_node_id
32
36
JOIN sys .pdw_table_mappings AS Tmap ON NTables .name = TMap .physical_name AND substring (TMap .physical_name ,40 , 10 ) = pnp .distribution_id
33
37
JOIN sys .objects AS o ON TMap .object_id = o .object_id
34
38
JOIN sys .pdw_nodes_column_store_segments AS cls ON pnp .partition_id = cls .partition_id AND pnp .distribution_id = cls .distribution_id
35
- JOIN sys .columns as cols ON o .object_id = cols .object_id AND cls .column_id = cols .column_id
36
- WHERE o .name = ' <Table_Name>' and cols .name = ' <Column_Name>'
37
- ORDER BY o .name , pnp .distribution_id , cls .min_data_id
39
+ JOIN sys .columns as cols ON o .object_id = cols .object_id AND cls .column_id = cols .column_id
40
+ WHERE o .name = ' <Table Name>' and cols .name = ' <Column Name>' and TMap .physical_name not like ' %HdTable%'
41
+ ORDER BY o .name , pnp .distribution_id , cls .min_data_id
42
+
38
43
39
44
```
40
45
0 commit comments