Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The GV$OB_SERVER_SCHEMA_INFO view displays information about the schemas on all OBServer nodes.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| REFRESHED_SCHEMA_VERSION | bigint(20) | NO | The latest version that the schemas under the tenant have been refreshed to. |
| RECEIVED_SCHEMA_VERSION | bigint(20) | NO | The version that the schemas under the tenant need to be refreshed to. |
| SCHEMA_COUNT | bigint(20) | NO | The total number of schema objects under the corresponding schema version. |
| SCHEMA_SIZE | bigint(20) | NO | The total memory size occupied by schema objects under the corresponding schema version, in bytes. |
| MIN_SSTABLE_SCHEMA_VERSION | bigint(20) | NO | The earliest schema version stored in the SSTable of the tenant. |
Sample query
Query schema information for all tenants on all OBServer nodes in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_SERVER_SCHEMA_INFO;
The query result is as follows:
+----------------+----------+-----------+--------------------------+-------------------------+--------------+-------------+----------------------------+
| SVR_IP | SVR_PORT | TENANT_ID | REFRESHED_SCHEMA_VERSION | RECEIVED_SCHEMA_VERSION | SCHEMA_COUNT | SCHEMA_SIZE | MIN_SSTABLE_SCHEMA_VERSION |
+----------------+----------+-----------+--------------------------+-------------------------+--------------+-------------+----------------------------+
| 172.xx.xxx.xxx | 2882 | 1 | 1735631801362280 | 1735631801362280 | 3763 | 2741466 | -1 |
| 172.xx.xxx.xxx | 2882 | 1001 | 1735634256987000 | 1735634256987000 | 2191 | 2112613 | -1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1735785545009528 | 1735785545009528 | 1774 | 1725881 | -1 |
| 172.xx.xxx.xxx | 2882 | 1003 | 1735638763632536 | 1735638763632536 | 2191 | 2112613 | -1 |
| 172.xx.xxx.xxx | 2882 | 1004 | 1735872883840472 | 1735872883840472 | 2360 | 2321104 | -1 |
| 172.xx.xxx.xxx | 2882 | 1 | 1735631801362280 | 1735631801362280 | 3763 | 2741466 | -1 |
| 172.xx.xxx.xxx | 2882 | 1001 | 1735634256987000 | 1735634256987000 | 2191 | 2112613 | -1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1735785545009528 | 1735785545009528 | 1774 | 1725881 | -1 |
| 172.xx.xxx.xxx | 2882 | 1003 | 1735638763632536 | 1735638763632536 | 2191 | 2112613 | -1 |
| 172.xx.xxx.xxx | 2882 | 1004 | 1735872883840472 | 1735872883840472 | 2360 | 2321104 | -1 |
| 172.xx.xxx.xxx | 2882 | 1 | 1735631801362280 | 1735631801362280 | 3763 | 2741466 | -1 |
| 172.xx.xxx.xxx | 2882 | 1001 | 1735634256987000 | 1735634256987000 | 2191 | 2112613 | -1 |
| 172.xx.xxx.xxx | 2882 | 1002 | 1735785545009528 | 1735785545009528 | 1774 | 1725881 | -1 |
| 172.xx.xxx.xxx | 2882 | 1003 | 1735638763632536 | 1735638763632536 | 2191 | 2112613 | -1 |
| 172.xx.xxx.xxx | 2882 | 1004 | 1735872883840472 | 1735872883840472 | 2360 | 2321104 | -1 |
+----------------+----------+-----------+--------------------------+-------------------------+--------------+-------------+----------------------------+
15 rows in set