show table status like 'test';     巡检脚本可以进一步完善了


还有一个办法就是在 SYS 租户里查询业务租户表分区的大小。

SELECT  t.tenant_id, a.tenant_name, t.table_name, d.database_name,  tg.tablegroup_name , t.part_num , t2.partition_id, t2.ZONE, t2.svr_ip , t2.svr_port, round(t2.data_size/1024/1024/1024) data_size_gb
	, IF(t.primary_zone = '' or t.primary_zone is null,a.primary_zone,t.primary_zone) primary_zone	  , IF(t.locality = '' OR t.locality IS NULL, a.locality, t.locality) AS locality	
FROM oceanbase.__all_tenant AS a  
	JOIN oceanbase.__all_virtual_database AS d ON ( a.tenant_id = d.tenant_id  ) 
	JOIN oceanbase.__all_virtual_table ASON (t.tenant_id = d.tenant_id AND t.database_id = d.database_id)
	JOIN oceanbase.__all_virtual_meta_table t2 ON (t.tenant_id = t2.tenant_id AND (t.table_id=t2.table_id OR t.tablegroup_id=t2.table_id)  AND t2.ROLE IN (1,2) 
	LEFT JOIN oceanbase.__all_virtual_tablegroup AS tg ON (t.tenant_id = tg.tenant_id and  t.tablegroup_id = tg.tablegroup_id) 
WHERE a.tenant_id IN (1001 ) AND  t.table_type IN (3)  
 -- and (t2.svr_ip, t2.svr_port) in ( ('',3882),('',3882))
ORDER BY t.tenant_id, tg.tablegroup_name, d.database_name, t.table_name, t2.partition_id