_virtual_storage_stat为什么会有那么多记录

【产品名称】

【产品版本】

【问题描述】

我有一个表,他在virtual_storage_stat下竟然有7条记录(在同一observer上、同一version、同一角色、partition_count=0),请问这7条记录是什么原因哪?是因为表太大了?但是我看row_count都是同样的400多万。

1 个赞

__all_virtual_storage_stat,是展示每个partition副本的统计信息,row_count 行数,table_id 表ID,partition_cnt 分区个数,partition_id 分区ID。

1.一个表在一个observer上有7条记录,可以show create table table_name看下表是不是有7个分区。 

2.“row_count都是同样的400多万”,是1-1-1三个副本吧?每个副本行数一样。


1 个赞

没有表分区。是1-1-1架构。但是在每个observer上都有7个副本。

1 个赞

贴下查询结果看看

1 个赞

+---------------+--------------+---------------+------------------+-------------+-----------+-----------+------------+

| partition_cnt | partition_id | minor_version | sstable_id    | occupy_size | used_size | row_count | store_type |

+---------------+--------------+---------------+------------------+-------------+-----------+-----------+------------+

|       0 |      0 |       0 | 1106009185965711 |  44628325 | 52428800 |  4710520 |     1 |

|       0 |      0 |       0 | 1106009185965712 |  37869166 | 41943040 |  4710520 |     1 |

|       0 |      0 |       0 | 1106009185965732 |  41940910 | 48234496 |  4710520 |     1 |

|       0 |      0 |       0 | 1106009185965762 |  20755876 | 23068672 |  4710520 |     1 |

|       0 |      0 |       0 | 1106009185965763 |  20837125 | 23068672 |  4710520 |     1 |

|       0 |      0 |       0 | 1106009185965766 |  19927872 | 27262976 |  4710520 |     1 |

|       0 |      0 |       0 | 1106009185965584 |  167738119 | 190840832 |  4710520 |     1 |

+---------------+--------------+---------------+------------------+-------------+-----------+-----------+------------+

where条件中指定了table_id='1106009185965584' and major_version='666'  and role='1' and svr_ip='20.*.*.*';  

是因为每行长度太长了吗?ob有没有类似oralce的行链接那种啊?我的表没有特殊字段(主要是varchar、date、time、integer),只是字段相对多点而已。

你这里的7条,包括源表、索引表:SELECT table_id,table_name FROM __all_virtual_table WHERE data_table_id = '1106009185965584';

------------------------------------------------------------------------------------------------------------------

这里,以table_id:1100611139454154为例,该表为ocp_meta租户下的表,表名为:task_instance

通过源表 table_id 查询索引表的 table_id 与 table_name:

1 个赞

谢谢!