Overview
The CDB_OB_SYS_VARIABLES view displays information about system variables for all tenants, including hidden variables that start with an underscore (_).
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| CREATE_TIME | timestamp(6) | NO | System Variable Creation Time |
| MODIFY_TIME | timestamp(6) | NO | System Variable Modification Time |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| NAME | varchar(128) | NO | System variable name |
| VALUE | varchar(65536) | YES | System variable value |
| MIN_VALUE | varchar(65536) | NO | Minimum Value |
| MAX_VALUE | varchar(65536) | NO | Maximum Value |
| SCOPE | varchar(16) | NO | Scope. Valid values:
|
| INFO | varchar(4096) | NO | Description |
| DEFAULT_VALUE | varchar(65536) | YES | Default value of system variables |
| ISDEFAULT | varchar(3) | NO | Whether it is the default value. |
Sample query
Query the system variable ob_query_timeout for all tenants.
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