OceanBase AI Database manages configurations by setting parameters and system variables.
Parameters
Parameters are usually used to control system behaviors at the server level or a higher level during O&M. You can set parameters for starting OBServer nodes and creating tenants. You can also modify them during the operation of OBServer nodes to adjust system behaviors.
For more information about parameters, see Set parameters.
System Variables
System variables are typically bound to user sessions and are used to control SQL behavior at the session level.
You can set global and session-level system variables. After you set a global system variable, the setting does not take effect for the current session but applies to all sessions established later. After you set a session-level system variable, the setting takes effect only for the current session.
For more information about system variables, see Set variables.
Comparison between Parameters and Variables
Comparison Items |
System parameters |
System variables |
|---|---|---|
| Effective Scope | Affects a cluster, tenant, zone, or server. | Affects a tenant globally or at the session level. |
| Effective Mode |
|
|
| Modification |
|
Modification can be performed only by using SQL statements. For example: obclient> SET ob_query_timeout = 20000000;obclient> SET GLOBAL ob_query_timeout = 20000000; |
| Persistence | Parameters are persisted into internal tables and configuration files and can be queried from the /home/admin/oceanbase/etc/observer.config.bin and /home/admin/oceanbase/etc/observer.config.bin.history files. |
Only global variables are persisted, while those at the session level are not. |
| Lifecycle | Long. A system parameter remains effective for the entire duration of a process. | Short. A system variable takes effect only after the tenant schema is created. |
| Query Method | You can query a system parameter by using the SHOW PARAMETERS statement. For example:obclient> SHOW PARAMETERS LIKE 'schema_history_expire_time'; |
You can query a system variable by using the SHOW [GLOBAL] VARIABLES or SELECT statement. For example:obclient> SHOW VARIABLES LIKE 'ob_query_timeout';obclient> SHOW GLOBAL VARIABLES LIKE 'ob_query_timeout'; obclient> SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout';obclient> SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout'; |