Note
This view is available starting with V4.0.0.
Purpose
The CDB_OB_SYS_VARIABLES view displays information about system variables (including hidden variables that start with an underscore) for all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| CREATE_TIME | timestamp(6) | NO | The creation time of the system variable. |
| MODIFY_TIME | timestamp(6) | NO | The modification time of the system variable. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| NAME | varchar(128) | NO | The name of the system variable. |
| VALUE | varchar(65536) | YES | The value of the system variable. |
| MIN_VALUE | varchar(65536) | NO | The minimum value. |
| MAX_VALUE | varchar(65536) | NO | The maximum value. |
| SCOPE | varchar(16) | NO | The scope. Valid values:
|
| INFO | varchar(4096) | NO | Description. |
| DEFAULT_VALUE | varchar(65536) | YES | The default value of the system variable
Note
|
| ISDEFAULT | varchar(3) | NO | Whether the value is the default value
Note
|
Sample query
Query the ob_query_timeout system variable for all tenants in the sys tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_SYS_VARIABLES WHERE NAME='ob_query_timeout';
The query result is as follows:
+----------------------------+----------------------------+-----------+------------------+----------+-----------+-----------+------------------+----------------------------------+---------------+-----------+
| CREATE_TIME | MODIFY_TIME | TENANT_ID | NAME | VALUE | MIN_VALUE | MAX_VALUE | SCOPE | INFO | DEFAULT_VALUE | ISDEFAULT |
+----------------------------+----------------------------+-----------+------------------+----------+-----------+-----------+------------------+----------------------------------+---------------+-----------+
| 2024-07-23 15:16:40.982646 | 2024-07-23 15:16:40.982646 | 1 | ob_query_timeout | 10000000 | | | GLOBAL | SESSION | Query timeout in microsecond(us) | 10000000 | YES |
| 2024-07-23 15:19:51.404894 | 2024-07-23 15:19:51.404894 | 1001 | ob_query_timeout | 10000000 | | | GLOBAL | SESSION | Query timeout in microsecond(us) | 10000000 | YES |
| 2024-07-23 15:19:59.763474 | 2024-07-23 15:19:59.763474 | 1002 | ob_query_timeout | 10000000 | | | GLOBAL | SESSION | Query timeout in microsecond(us) | 10000000 | YES |
| 2024-07-23 15:20:30.120028 | 2024-07-23 15:20:30.120028 | 1003 | ob_query_timeout | 10000000 | | | GLOBAL | SESSION | Query timeout in microsecond(us) | 10000000 | YES |
| 2024-07-23 15:20:40.848027 | 2024-07-23 15:20:40.848027 | 1004 | ob_query_timeout | 10000000 | | | GLOBAL | SESSION | Query timeout in microsecond(us) | 10000000 | YES |
+----------------------------+----------------------------+-----------+------------------+----------+-----------+-----------+------------------+----------------------------------+---------------+-----------+
5 rows in set
