SET
Description
Sets the specified system variables or user-defined variables for StarRocks. You can view the system variables of StarRocks using SHOW VARIABLES. For details about system variables, see System Variables. For details about user-defined variables, see User-defined variables.
Syntax
SET [ GLOBAL | SESSION ] <variable_name> = <value> [, <variable_name> = <value>] ...
Parameters
Parameter | Description |
---|---|
Modifier:
|
NOTE Only users with the ADMIN privilege can set the variables globally. |
variable_name | The name of the variable. |
value | The value of the variable. |
Examples
Example 1: Set the time_zone
to Asia/Shanghai
within the session.
mysql> SET time_zone = "Asia/Shanghai";
Query OK, 0 rows affected (0.00 sec)
Example 2: Set the exec_mem_limit
to 2147483648
globally.
mysql> SET GLOBAL exec_mem_limit = 2147483648;
Query OK, 0 rows affected (0.00 sec)
Example 3: Set multiple global variables. The GLOBAL
keyword needs to be preposed for each variable.
mysql> SET
GLOBAL exec_mem_limit = 2147483648,
GLOBAL time_zone = "Asia/Shanghai";
Query OK, 0 rows affected (0.00 sec)