All Products
Search
Document Center

Lindorm:ALTER SYSTEM

Last Updated:Apr 28, 2024

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.

Important

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:

  • Constants of the BIGINT type.

  • Constants of the DOUBLE type.

  • Constants of the BOOLEAN type.

  • Constants of the VARCHAR type.

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 Cell Tag is not supported since ldFileVersion is too small=2 error message is returned when you use LindormTable, you can set this parameter to 5 to solve the issue.

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 lindorm._slow_query_ view. You can use the information for O&M, inspection, or troubleshooting. Valid values:

  • TRUE

  • FALSE (default)

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 lindorm_slow_query view. Unit: millisecond. The default value of this parameter 10000 ms, which equals to 10 seconds.

Note

Only queries sent to the Lindorm server after a new threshold is configured are checked based on the new threshold.

USER_AUTH

Boolean

LindormTSDB

Specifies whether to enable the user authentication and permission verification feature for LindormTSDB. Valid values:

  • TRUE: Enable the user authentication and permission verification feature. If this feature is enabled, you must provide your username and password when you connect to LindormTSDB. LindormTSDB verifies the user and authenticates the data objects in the SQL statements that are initiated by using the connection.

  • FALSE (default): Do not enable the user authentication and permission verification feature. If this feature is disabled, you can connect to LindormTSDB without the need to provide your username and password.

    Important

    After the user authentication and permission verification feature is enabled for LindormTSDB, user credentials are required for all subsequent requests. If you do not specify user credentials in a request, the request may fail the authentication. You must also specify user credentials when you execute the ALTER SYSTEM statement to enable the user authentication and permission verification feature. After the feature is enabled, some existing services may fail to be accessed. Therefore, we recommend that you carefully plan and fully evaluate the impacts before you enable the feature.

Examples

  • Set the number of versions retained for data files in LindormTable to 5.

    ALTER SYSTEM SET FILE_FORMAT_VERSION = 5;
  • Enable the slow query view for LindormTable and specify the execution duration threshold for slow queries.

    ALTER SYSTEM SET SLOW_QUERY_RECORD_ENABLE = TRUE; --Enable the slow query view.
    ALTER SYSTEM SET SLOW_QUERY_TIME_MS = 1000; --Set the execution duration threshold for slow queries to 1000 ms, which is equal to 1 second.
  • Enable or disable the user authentication and permission verification feature.

    ALTER SYSTEM SET USER_AUTH=TRUE; --Enable the user authentication and permission verification feature.
    ALTER SYSTEM SET USER_AUTH=FALSE; --Disable the user authentication and permission verification feature.