All Products
Search
Document Center

AnalyticDB for MySQL:Common configuration parameters

Last Updated:Dec 15, 2023

This topic describes the common configuration parameters in AnalyticDB for MySQL.

Configuration

Parameter

Description

Example

References

Switchover window

REPLICATION_SWITCH_TIME_RANGE

The window during which the existing cluster is switched over to a new cluster. During a switchover to a new cluster, the existing cluster becomes read-only for a period of 5 to 10 minutes. After you are connected to the existing cluster, you can set the REPLICATION_SWITCH_TIME_RANGE parameter to specify the switchover window.

Note

If the switchover window is not specified, the existing cluster is switched over to a new cluster after the incremental data of the existing cluster is synchronized in real time to the new cluster.

SET ADB_CONFIG REPLICATION_SWITCH_TIME_RANGE=`23:00, 23:30`;

Scale a Data Warehouse Edition cluster and change the cluster mode

Maximum number of values specified by the IN operator

MAX_IN_ITEMS_COUNT

The maximum number of values that can be specified by the IN operator. Default value: 2000.

SET ADB_CONFIG MAX_IN_ITEMS_COUNT=3000;

Writes and queries

Query timeout period

QUERY_TIMEOUT

The timeout period of all queries in a cluster. Unit: milliseconds.

SET ADB_CONFIG QUERY_TIMEOUT=1000;

The timeout period of a single query. Unit: milliseconds.

/*+ QUERY_TIMEOUT=1000 */select count(*) from t;

Timeout period of INSERT, UPDATE, and DELETE statements

INSERT_SELECT_TIMEOUT

The maximum execution duration of the INSERT, UPDATE, and DELETE statements in a cluster. Default value: 24 × 3600000. Unit: milliseconds.

SET ADB_CONFIG INSERT_SELECT_TIMEOUT=3600000;

Limits

The maximum execution duration of the INSERT, UPDATE, and DELETE statements in a query. Default value: 24 × 3600000. Unit: milliseconds.

/*+ INSERT_SELECT_TIMEOUT=3600000 */update customer set customer_name ='adb' where customer_id ='2369';

Filter conditions without pushdown

  • Engine version 3.1.4 or later: FILTER_NOT_PUSHDOWN_COLUMNS

  • Engine version earlier than 3.1.4: NO_INDEX_COLUMNS

Disables filter condition pushdown for specific columns in a cluster.

  • Engine version 3.1.4 or later: set adb_config filter_not_pushdown_columns=[Schema1.tableName1:colName1|colName2;Schema2.tableName2:colName1|colName2]

  • Engine version earlier than 3.1.4: set adb_config no_index_columns=[tableName1.colName1;colName2,tableName2.colName1]

Filter conditions without pushdown

Disables filter condition pushdown for specific columns in a query.

  • Engine version 3.1.4 or later: /*+ filter_not_pushdown_columns=[Schema1.table1:colName1|colName2;Schema2.table2:colName1|colName2] */

  • Engine version earlier than 3.1.4: /*+ no_index_columns=[tableName1.colName1;colName2,tableName2.colName1] */

Query execution mode

QUERY_TYPE

The query execution mode of a cluster. Valid values:

  • interactive

  • batch

Note

The query execution mode of a Data Warehouse Edition (V3.0) cluster in reserved mode or a Data Lakehouse Edition (V3.0) cluster cannot be changed.

SET ADB_CONFIG QUERY_TYPE=interactive;

Query execution modes

Query queue

XIHE_ENV_QUERY_ETL_MAX_CONCURRENT_SIZE

The maximum number of queries that can be executed for LOWEST queues on a single frontend node. Default value: 20.

SET ADB_CONFIG XIHE_ENV_QUERY_ETL_MAX_CONCURRENT_SIZE=20;

Priority queues and concurrency control of interactive resource groups

XIHE_ENV_QUERY_ETL_MAX_QUEUED_SIZE

The maximum number of queries that can be queued for LOWEST queues on a single frontend node. Default value: 200.

SET ADB_CONFIG XIHE_ENV_QUERY_ETL_MAX_QUEUED_SIZE=200;

XIHE_ENV_QUERY_LOW_PRIORITY_MAX_CONCURRENT_SIZE

The maximum number of queries that can be executed for LOW queues on a single frontend node. Default value: 20.

SET ADB_CONFIG XIHE_ENV_QUERY_LOW_PRIORITY_MAX_CONCURRENT_SIZE=20;

XIHE_ENV_QUERY_LOW_PRIORITY_MAX_QUEUED_SIZE

The maximum number of queries that can be queued for LOW queues on a single frontend node. Default value: 200.

SET ADB_CONFIG XIHE_ENV_QUERY_LOW_PRIORITY_MAX_QUEUED_SIZE=200;

XIHE_ENV_QUERY_NORMAL_MAX_CONCURRENT_SIZE

The maximum number of queries that can be executed for NORMAL queues on a single frontend node. Default value: 20.

SET ADB_CONFIG XIHE_ENV_QUERY_NORMAL_MAX_CONCURRENT_SIZE=20;

XIHE_ENV_QUERY_NORMAL_MAX_QUEUED_SIZE

The maximum number of queries that can be queued for NORMAL queues on a single frontend node. Default value: 200.

SET ADB_CONFIG XIHE_ENV_QUERY_NORMAL_MAX_QUEUED_SIZE=200;

XIHE_ENV_QUERY_HIGH_MAX_CONCURRENT_SIZE

The maximum number of queries that can be executed for HIGH queues on a single frontend node. Default value: 40.

SET ADB_CONFIG XIHE_ENV_QUERY_HIGH_MAX_CONCURRENT_SIZE=40;

XIHE_ENV_QUERY_HIGH_MAX_QUEUED_SIZE

The maximum number of queries that can be queued for HIGH queues on a single frontend node. Default value: 400.

SET ADB_CONFIG XIHE_ENV_QUERY_HIGH_MAX_QUEUED_SIZE=400;

Data import by using MaxCompute external tables

SQL_OUTPUT_BATCH_SIZE

The amount of batch imported data.

set adb_config SQL_OUTPUT_BATCH_SIZE = 6000;

Import and export

ENABLE_ODPS_MULTI_PARTITION_PART_MATCH

Specifies whether to obtain the number of entries in each MaxCompute partition in advance.

set adb_config ENABLE_ODPS_MULTI_PARTITION_PART_MATCH=false;

Automatic scheduling for BUILD jobs

RC_CSTORE_BUILD_SCHEDULE_PERIOD

The time range within which you want to schedule BUILD jobs. This parameter applies to job scheduling, not job execution. The values of start_time and end_time must be integers. Valid values: 0 to 24.

SET ADB_CONFIG RC_CSTORE_BUILD_SCHEDULE_PERIOD=`<start_time>,<end_time>`;

Configure automatic scheduling for BUILD jobs

Scheduling priority of BUILD jobs

build_task_priority

Configures a scheduling priority for only one table. The configured priority takes effect only for the current BUILD job.

The task_priority parameter specifies the scheduling priority of BUILD jobs. The value must be an integer. The default value is 0.

/*build_task_priority = <task_priority> */ BUILD TABLE <db_name>.<table_name>;

Configure scheduling priorities for BUILD jobs

ADB_CONFIG RC_BUILD_TASK_PRIORITY_LIST

Configures scheduling priorities for one or more tables. The configured priorities are effective until you configure new scheduling priorities of BUILD jobs for the tables.

The task_priority parameter specifies the scheduling priority of BUILD jobs. The value must be an integer. The default value is 0.

SET ADB_CONFIG RC_BUILD_TASK_PRIORITY_LIST = `<db1_name>.<table1_name>.<task_priority>;<db2_name>.<table2_name>.<task_priority>`;

Elastic import

RC_ELASTIC_JOB_SCHEDULER_ENABLE

Enables the elastic import feature.

SET ADB_CONFIG RC_ELASTIC_JOB_SCHEDULER_ENABLE=true;

  • elastic_load

  • elastic_load_configs

Selects elastic import and configures a resource group for the import job.

/*elastic_load=true, elastic_load_configs=[adb.load.resource.group.name=resource_group]*/

SUBMIT JOB INSERT OVERWRITE INTO adb_demo.adb_import_test SELECT * FROM adb_external_db.person;