Database Reference
In-Depth Information
Figure 10.5 Comparing logical and physical table names in PDW
As for understanding which column was the one we distributed on, we need
a different query. This information is not held on sys.columns , and so we
need to look into some PDW proprietary extensions for this information:
SELECT t.name AS TableName
, tp.distribution_policy_desc AS
TableDistributionPolicyDesc
, c.name AS ColumnName
, y.name AS DataType
, c.max_length AS
DataMaxLength
, c.precision AS
DataPrecision
, c.Scale AS DataScale
, c.collation_name AS
ColumnCollation
, c.Is_Nullable AS
ColumnIsNullable
, cm.distribution_ordinal AS
IsDistributionColumn
FROM sys.columns c
JOIN sys.pdw_column_distribution_properties cm
ON c.object_id =
cm.object_id
AND c.column_id =
cm.column_id
JOIN sys.types y ON c.user_type_id
= y.user_type_id
JOIN sys.Tables t ON c.object_id =
t.object_id
JOIN sys.pdw_table_distribution_properties tp
 
Search WWH ::




Custom Search