Hi team, I am seeing differences in actual number ...
# questions-and-troubleshooting
a
Hi team, I am seeing differences in actual number of rows vs “RowCount” in Partition. We are using StarRocks 4 (Shared Nothing)
Copy code
> select count(1) from table1 - 
48M rows
> SHOW PARTITIONS FROM table1;

PartitionId,PartitionName,VisibleVersion,VisibleVersionTime,VisibleVersionHash,State,PartitionKey,Range,DistributionKey,Buckets,ReplicationNum,StorageMedium,CooldownTime,LastConsistencyCheckTime,DataSize,StorageSize,IsInMemory,RowCount,DataVersion,VersionEpoch,VersionTxnType,TabletBalanced
175365,table1,4801655,2025-12-04 04:28:43,0,NORMAL,"","",agency_id,24,3,HDD,9999-12-31 15:59:59,,35GB,35GB,false,58749200,4801655,377827126604201984,TXN_NORMAL,true
RowCount returned by this command shows 58M. (10M greater than actual rows). Because of this, we are seeing low health score in Stats Meta too. Anyway to fix this? I tried “REPAIR TABLE” and ANALYZE FULL command already. note: there has been no dramatic changes in table, I see this from past 4 weeks. There is only one partition in this primary key table. It has 24 buckets by hash.
k
show tablets from {table}
will gives the detailed row count for every tablet, and
select count from {table} tablet (xxx)
to get the actual row count from the tablet, try to find the difference from tablet level and then check the tablet meta for further investigation.
a
Thanks @Kevin Cai In total there are 72 tablet entries, i do differences in the counts mentioned by you for some of the tablets. Whats the next course of action?
k
select a specific tablet that has difference. try to parse the tablet meta manually and check the row count in the metadata, find out how this difference comes from.