зеркало из https://github.com/Azure/AzureAdvisor.git
Add files via upload
This commit is contained in:
Родитель
4d00d089b9
Коммит
b81867e583
|
@ -0,0 +1,15 @@
|
||||||
|
SELECT sm.name as [Schema_Name]
|
||||||
|
, tb.[name] AS [logical_table_name]
|
||||||
|
, sum(rg.[total_rows]) AS [total_CCI_rows]
|
||||||
|
FROM sys.[schemas] sm
|
||||||
|
JOIN sys.[tables] tb ON sm.[schema_id] = tb.[schema_id]
|
||||||
|
JOIN sys.[pdw_table_mappings] mp ON tb.[object_id] = mp.[object_id]
|
||||||
|
JOIN sys.[pdw_nodes_tables] nt ON nt.[name] = mp.[physical_name]
|
||||||
|
JOIN sys.[dm_pdw_nodes_db_column_store_row_group_physical_stats] rg ON rg.[object_id] = nt.[object_id]
|
||||||
|
AND rg.[pdw_node_id] = nt.[pdw_node_id]
|
||||||
|
AND rg.[distribution_id] = nt.[distribution_id]
|
||||||
|
GROUP BY sm.name, tb.name, rg.[object_id], index_id
|
||||||
|
HAVING sum(rg.[total_rows]) < 60000000 -- Show only CCI tables with less than 60m records
|
||||||
|
;
|
||||||
|
|
||||||
|
-- https://docs.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-tables-index#optimizing-clustered-columnstore-indexes
|
Загрузка…
Ссылка в новой задаче