【 使用环境 】生产环境
【 OB or 其他组件 】OB
【 使用版本 】V4.2.1
【问题描述】在社区版V3.1.4的时候,我们使用自己写的工具通过以下SQL查询单表、分区表以及二级分区表的行数
sql=“select A.part_name, B.part_id, B.total_row_count from (select (partition_id >> 32)&0x0FFFFFFF as part_id,sum(row_count) AS total_row_count from oceanbase.gv$partition where table_id={0} and role = 1 group by part_id order by part_id) B, __all_part A where A.part_id=B.part_id and A.table_id=({0}&(~(-1<<40)))”.format(full_table_id)
sql=“select A.part_name, B.part_id, B.total_row_count from (select (partition_id) as part_id,sum(row_count) AS total_row_count from oceanbase.gv$partition where table_id={0} and role = 1 group by part_id order by part_id) B, __all_part A where A.part_id=B.part_id and A.table_id=({0}&(~(-1<<40)))”.format(full_table_id)
sql=‘select “N/A” as part_name, partition_id, row_count from gv$partition where table_id={0} and role=1’.format(full_table_id)
升级之后,GV$系列的表已经不存在,也找不到哪张系统表统计了分区及表的行数,如何解决?