话题中提及的__all_virtual_table_mgr表中的size,单位是字节吗?是否可以使用话题中的sql来查询一张表的体积大小
语句是这个 你看看 怎么修改条件查询
select /*+ query_timeout(30000000) */ a.TENANT_ID, a.DATABASE_NAME, a.TABLE_NAME, a.TABLE_ID,
sum(
case
when b.nested_offset = 0 then IFNULL(b.data_block_count+b.index_block_count+b.linked_block_count, 0) * 2 * 1024 * 1024
else IFNULL(b.size, 0)
end
) /1024/1024/1024 as data_size_in_GB
from CDB_OB_TABLE_LOCATIONS a left join __all_virtual_table_mgr b
on a.svr_ip = b.svr_ip and a.svr_port=b.svr_port and a.tenant_id = b.tenant_id and a.LS_ID = b.LS_ID and a.TABLET_ID = b.TABLET_ID
where a.role = ‘LEADER’ and a.tenant_id = ‘xxxx’ and a.DATABASE_NAME= ‘xxxx’ and a.TABLE_NAME = ‘xxxx’
and b.table_type >= 10 and b.size > 0 group by a.TABLE_ID;