Azure / Azure/AzureAdvisor

Wrong row count in FindSmallCCITables.sql script

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
10
Forks
11
PR merge metrics
No merged PRs in 30d

Description

In the script FindSmallCCITables.sql, in order to find all the tables with row number > 60.000.000, the column total_rows of the dm_pdw_nodes_db_column_store_row_group_physical_stats view is used.

MS documentation reports this:
![image](https://user-images.githubusercontent.com/72858687/203977589-99575444-5e02-4cd0-9ee5-7cfc44d53b09.png)

[https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-column-store-row-group-physical-stats-transact-sql?toc=%2Fazure%2Fsynapse-analytics%2Fsql-data-warehouse%2Ftoc.json&bc=%2Fazure%2Fsynapse-analytics%2Fsql-data-warehouse%2Fbreadcrumb%2Ftoc.json&view=sql-server-ver16&preserve-view=true&viewFallbackFrom=azure-sqldw-latest](url)

Is it correct to count only rows in the row group?
Probably it is better to use row_count column from sys.dm_pdw_nodes_db_partition_stats view.

Thank you.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.