You can use the ALTER SYSTEM syntax to modify dynamic system parameters.
Applicable engines and versions
The ALTER SYSTEM syntax is applicable to LindormTable and LindormTSDB.
The version of Lindorm SQL must be 2.6.3.2 or later. For more information about how to view the version of Lindorm SQL, see SQL versions.
Syntax
alter_system_statement ::= ALTER SYSTEM SET configuration_identifier = configuration_literal
Parameters
Parameter | Description |
configuration_identifier | The name of the dynamic parameter. The parameter name must be a SQL identifier. For more information about the items that can be configured for this parameter, see Supported configuration items. |
configuration_literal | The value of the dynamic parameter. The value must be a SQL constant. The following types of constants are supported:
|
Supported configuration items
Configuration item | Data type | Applicable engine | Description |
FILE_FORMAT_VERSION | Integer | LindormTable | Specifies the number of versions retained for data files in LindormTable. By default, two versions are retained for a data file in LindormTable. Note If the |
SLOW_QUERY_RECORD_ENABLE | Boolean | LindormTable | Specifies whether to enable the slow query view for LindormTable. If this parameter is set to TRUE, the information about the queries whose execution duration exceeds the specified threshold is recorded in the
|
SLOW_QUERY_TIME_MS | Integer | LindormTable | Specifies the execution duration threshold for slow queries. Queries whose execution duration exceeds the threshold are considered slow queries and are recorded in the Note Only queries sent to the Lindorm server after a new threshold is configured are checked based on the new threshold. |
MAX_CONN | Integer | LindormTable | Specifies the maximum number of connections to LindormTable. The value of this parameter must be greater than 0. Important This item is available only in LindormTable 2.6.6 and later versions. If you cannot upgrade the LindormTable version of your instance to 2.6.6 or a later version in the console, contact the technical support (DingTalk ID: s0s3eg3). |
USER_AUTH | Boolean | LindormTSDB | Specifies whether to enable the user authentication and permission verification feature for LindormTSDB. Valid values:
|
Examples
Set the number of versions retained for data files in LindormTable to 5.
ALTER SYSTEM SET FILE_FORMAT_VERSION = 5;
Verify the result
You can execute the
SHOW SYSTEM VARIABLES LIKE 'FILE_FORMAT_VERSION';
statement to check whether the parameter is successfully configured.Enable the slow query view for LindormTable and specify the execution duration threshold for slow queries.
-- Enable the slow query view. ALTER SYSTEM SET SLOW_QUERY_RECORD_ENABLE = TRUE; ALTER SYSTEM SET SLOW_QUERY_TIME_MS = 1000;
Verify the result
You can execute the
SHOW SYSTEM VARIABLES LIKE 'SLOW_QUERY_TIME_MS';
statement to check whether the parameter is successfully configured.Set the maximum number of connections to LindormTable to 5,000.
ALTER SYSTEM SET MAX_CONN = 5000;
Verify the result
You can execute the
SHOW SYSTEM VARIABLES LIKE 'MAX_CONN';
statement to check whether the parameter is successfully configured.Enable or disable the user authentication and permission verification feature.
-- Enable the user authentication and permission verification feature. ALTER SYSTEM SET USER_AUTH=TRUE; -- Disable the user authentication and permission verification feature. ALTER SYSTEM SET USER_AUTH=FALSE;