如何OceanBase V4.x 索引大小查询?
1 个赞
– 查询一个表索引的大小,单副本的大小
select
a.table_name,
b.index_name,
c.data_size/1024/1024,
c.REQUIRED_SIZE/1024/1024
from
oceanbase.dba_ob_table_locations a,
oceanbase.dba_ob_table_locations b,
oceanbase.dba_ob_tablet_replicas c
where
b.tablet_id = c.tablet_id
and b.role = ‘LEADER’
and b.svr_ip = c.svr_ip
and a.table_name = ‘表名称’
and a.role = ‘LEADER’
and a.database_name = ‘数据库名称’
and a.table_id = b.data_table_id
1 个赞
学习一下