Wrong row count in FindSmallCCITables.sql script
- 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:

[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.