系统表 __all_virtual_table 中 table_type 等字段的含义

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】4.2.1.7
【问题描述】想咨询下4.X环境下系统表 __all_virtual_table 中 table_type、Partition_status、 Index_type、Index_status的各代表的定义是什么

3 个赞

OceanBase 社区已接收您的帖子,正在跟进中。

3 个赞

4.x不推外部用户荐用__all_virtual_table这种内部表了

3 个赞

https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207747?back=kb
可以参考下这篇文章

3 个赞

比如4.X的table_type多了12、13这两类,这跟以前有什么不同

3 个赞

这是3.X的,4.X的table_type多了12、13这是什么含义

3 个赞

这个是virtual_table_mgr表吧

2 个赞

AUX_LOB_PIECE = 12,
AUX_LOB_META = 13,

其他几个也可以查看这个源码文件
src/share/schema/ob_schema_struct.h

6 个赞

:flushed:看错了,这是memstore级定义的类型,他看的是schema级定义的类型

2 个赞

请教下,这AUX是什么的缩写?

1 个赞

应该是Auxiliary

1 个赞

辅助表的意思,LOB 的存储的方式为外联存储(INROW)时,可通过表名查看对应lob名称

select oc.table_name lob_aux_table, ns.table_name, ns.column_name from oceanbase.dba_ob_table_locations oc , information_schema.columns ns , oceanbase.__all_virtual_table oa where oc.data_table_id=oa.table_id and oc.TABLE_TYPE= ‘LOB AUX TABLE’ and ns.table_name=oa.table_name and ns.table_schema=‘test’ and ns.column_type in(‘TEXT’, ‘BLOB’ , ‘JSON’ , ‘Geometry’) ;

https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000823280
https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001051172

1 个赞

问题总结回复:

  1. 4.X环境下系统表 __all_virtual_table 中 table_type、Partition_status、 Index_type、Index_status的各代表的定义是什么

参考
https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207747?back=kb

4.X的table_type多了12、13这两类,这跟以前有什么不同 ?
AUX_LOB_PIECE = 12,
AUX_LOB_META = 13,
其它几个建议查下源码:src/share/schema/ob_schema_struct.h

  1. 这AUX是什么的缩写?
    Auxiliary,辅助表的意思,LOB 的存储的方式为外联存储(INROW)时,可通过表名查看对应lob名称

select oc.table_name lob_aux_table, ns.table_name, ns.column_name from oceanbase.dba_ob_table_locations oc , information_schema.columns ns , oceanbase.__all_virtual_table oa where oc.data_table_id=oa.table_id and oc.TABLE_TYPE= ‘LOB AUX TABLE’ and ns.table_name=oa.table_name and ns.table_schema=‘test’ and ns.column_type in(‘TEXT’, ‘BLOB’ , ‘JSON’ , ‘Geometry’) ;

https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000823280
https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000001051172

2 个赞