Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
This view displays information about all tables in all tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The tenant ID. |
| OWNER | varchar(128) | NO | The owner of the table. |
| TABLE_NAME | varchar(128) | NO | The name of the table. |
| TABLESPACE_NAME | varchar(30) | NO | The name of the tablespace that contains the table. |
| CLUSTER_NAME | varchar(128) | NO | Not supported. The value of this field is NULL. |
| IOT_NAME | varchar(128) | NO | Not supported. The value of this field is NULL. |
| STATUS | varchar(8) | NO | The status of the table. Valid values: |
| PCT_FREE | bigint(20) | NO | The minimum percentage of free space in a block. |
| PCT_USED | bigint(0) | NO | Not supported. The value of this field is NULL. |
| INI_TRANS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| MAX_TRANS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| INITIAL_EXTENT | bigint(0) | NO | Not supported. The value of this field is NULL. |
| NEXT_EXTENT | bigint(0) | NO | Not supported. The value of this field is NULL. |
| MIN_EXTENTS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| MAX_EXTENTS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| PCT_INCREASE | bigint(0) | NO | Not supported. The value of this field is NULL. |
| FREELISTS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| FREELIST_GROUPS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| LOGGING | varchar(3) | NO | Not supported. The value of this field is NULL. |
| BACKED_UP | varchar(1) | NO | Not supported. The value of this field is NULL. |
| NUM_ROWS | bigint(21) | NO | The number of rows in the table. |
| BLOCKS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| EMPTY_BLOCKS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| AVG_SPACE | bigint(0) | NO | Not supported. The value of this field is NULL. |
| CHAIN_CNT | bigint(0) | NO | Not supported. The value of this field is NULL. |
| AVG_ROW_LEN | bigint(0) | NO | Not supported. The value of this field is NULL. |
| AVG_SPACE_FREELIST_BLOCKS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| NUM_FREELIST_BLOCKS | bigint(0) | NO | Not supported. The value of this field is NULL. |
| DEGREE | varchar(10) | NO | Not supported. The value of this field is NULL. |
| INSTANCES | varchar(10) | NO | Not supported. The value of this field is NULL. |
| CACHE | varchar(5) | NO | Not supported. The value of this field is NULL. |
| TABLE_LOCK | varchar(8) | NO | Not supported. The value of this field is NULL. |
| SAMPLE_SIZE | bigint(0) | NO | Not supported. The value of this field is NULL. |
| LAST_ANALYZED | date | NO | Not supported. The value of this field is NULL. |
| PARTITIONED | varchar(3) | NO | Specifies whether the table is partitioned. Valid values: |
| IOT_TYPE | varchar(12) | NO | Indicates the table organization method. Valid values:
NoteFor OceanBase Database V4.3.5, this field is supported starting from V4.3.5 BP1. |
| TEMPORARY | varchar(1) | NO | Specifies whether the table is a temporary table. |
| SECONDARY | varchar(1) | NO | Not supported. The value of this field is NULL. |
| NESTED | varchar(3) | NO | Specifies whether the table is a nested table. Valid values: |
| BUFFER_POOL | varchar(7) | NO | Not supported. The value of this field is NULL. |
| FLASH_CACHE | varchar(7) | NO | Not supported. The value of this field is NULL. |
| CELL_FLASH_CACHE | varchar(7) | NO | Not supported. The value of this field is NULL. |
| ROW_MOVEMENT | varchar(8) | NO | Records the enabled/disabled status of Row Movement, with the following values:
Note
|
| GLOBAL_STATS | varchar(3) | NO | Not supported. The value of this field is NULL. |
| USER_STATS | varchar(3) | NO | Not supported. The value of this field is NULL. |
| DURATION | varchar(15) | NO | The duration of a temporary table. |
| SKIP_CORRUPT | varchar(8) | NO | Not supported. The value of this field is NULL. |
| MONITORING | varchar(3) | NO | Not supported. The value of this field is NULL. |
| CLUSTER_OWNER | varchar(128) | NO | Not supported. The value of this field is NULL. |
| DEPENDENCIES | varchar(8) | NO | Not supported. The value of this field is NULL. |
| COMPRESSION | varchar(8) | NO | Not supported. The value of this field is NULL. |
| COMPRESS_FOR | varchar(30) | NO | Not supported. The value of this field is NULL. |
| DROPPED | varchar(3) | NO | Specifies whether the dropped table is in the recycle bin. |
| READ_ONLY | varchar(3) | NO | Not supported. The value of this field is NULL. |
| SEGMENT_CREATED | varchar(3) | NO | Not supported. The value of this field is NULL. |
| RESULT_CACHE | varchar(7) | NO | Not supported. The value of this field is NULL. |
| CLUSTERING | varchar(3) | NO | NULL. |
| ACTIVITY_TRACKING | varchar(23) | NO | NULL. |
| DML_TIMESTAMP | varchar(25) | NO | NULL. |
| HAS_IDENTITY | varchar(3) | NO | NULL. |
| CONTAINER_DATA | varchar(3) | NO | NULL. |
| INMEMORY | varchar(8) | NO | NULL. |
| INMEMORY_PRIORITY | varchar(8) | NO | NULL. |
| INMEMORY_DISTRIBUTE | varchar(15) | NO | Not supported. The value of this field is NULL. |
| INMEMORY_COMPRESSION | varchar(17) | NO | NULL. |
| INMEMORY_DUPLICATE | varchar(13) | NO | NULL. |
| DEFAULT_COLLATION | varchar(100) | NO | NULL. |
| DUPLICATED | varchar(1) | NO | NULL. |
| SHARDED | varchar(1) | NO | NULL. |
| EXTERNALLY_SHARDED | varchar(1) | NO | NULL. |
| EXTERNALLY_DUPLICATED | varchar(1) | NO | NULL. |
| EXTERNAL | varchar(3) | NO | Specifies whether the table is an external table. Valid values: |
| HYBRID | varchar(3) | NO | NULL. |
| CELLMEMORY | varchar(24) | NO | Not supported. The value of this field is NULL. |
| CONTAINERS_DEFAULT | varchar(3) | NO | NULL. |
| CONTAINER_MAP | varchar(3) | NO | NULL. |
| EXTENDED_DATA_LINK | varchar(3) | NO | NULL. |
| EXTENDED_DATA_LINK_MAP | varchar(3) | NO | NULL. |
| INMEMORY_SERVICE | varchar(12) | NO | NULL. |
| INMEMORY_SERVICE_NAME | varchar(1000) | NO | NULL. |
| CONTAINER_MAP_OBJECT | varchar(3) | NO | NULL. |
| MEMOPTIMIZE_READ | varchar(8) | NO | NULL. |
| MEMOPTIMIZE_WRITE | varchar(8) | NO | NULL. |
| HAS_SENSITIVE_COLUMN | varchar(3) | NO | NULL. |
| ADMIT_NULL | varchar(3) | NO | NULL. |
| DATA_LINK_DML_ENABLED | varchar(3) | NO | NULL. |
| LOGICAL_REPLICATION | varchar(8) | NO | NULL. |
| AUTO_SPLIT | varchar(16) | NO | Specifies whether automatic partitioning is enabled for the table. Valid values:
NoteThis field was introduced in V4.3.4. |
| AUTO_SPLIT_TABLET_SIZE | bigint(20) | NO | The threshold for automatic tablet splitting. If the value of the AUTO_SPLIT field is FALSE, the value of the AUTO_SPLIT_TABLET_SIZE field is 0.
NoteThis field was introduced in V4.3.4. |
Sample query
Query the information of table tbl1 belonging to the tenant with tenant ID 1002 under the system tenant.
obclient [oceanbase]> SELECT CON_ID, OWNER, TABLE_NAME, STATUS, PCT_FREE, TEMPORARY, NESTED, ROW_MOVEMENT, DROPPED, EXTERNAL FROM oceanbase.CDB_TABLES WHERE CON_ID=1002 AND TABLE_NAME = 'tbl1';
The query result is as follows:
+--------+----------+------------+--------+----------+-----------+--------+--------------+---------+----------+
| CON_ID | OWNER | TABLE_NAME | STATUS | PCT_FREE | TEMPORARY | NESTED | ROW_MOVEMENT | DROPPED | EXTERNAL |
+--------+----------+------------+--------+----------+-----------+--------+--------------+---------+----------+
| 1002 | infotest | tbl1 | VALID | 0 | N | NO | NO | NO | NO |
+--------+----------+------------+--------+----------+-----------+--------+--------------+---------+----------+
1 row in set