All Products
Search
Document Center

AnalyticDB:Config and hint configuration parameters

Last Updated:Sep 24, 2026

AnalyticDB for MySQL allows you to configure parameters by using the SET command (syntax: SET ADB_CONFIG KEY=VALUE) and hints (syntax: /*+ KEY=VALUE*/). The SET ADB_CONFIG command modifies global configurations that take effect across the entire cluster. A hint applies only to the specified SQL statement and does not affect global configurations. If both SET ADB_CONFIG and a hint are used to configure the same parameter, the hint takes precedence. This topic describes the common configuration parameters in AnalyticDB for MySQL.

Common config parameters

When the cluster kernel version is 3.2.5 or later, the system validates the types of configuration parameters.

Note You can view and upgrade the kernel version on the Cluster Information page of the AnalyticDB for MySQL console, in the Configuration Information section.

Category

Parameter

Description

Example

References

Switchover window

REPLICATION_SWITCH_TIME_RANGE

Description During a cluster switchover, the old cluster supports only read operations for 5 to 10 minutes. After you connect to the old cluster, you can configure REPLICATION_SWITCH_TIME_RANGE to specify the time window for switching between the old and new clusters. If you do not configure a switchover time window, the old and new clusters are automatically switched after all incremental data in the old cluster is synchronized to the new cluster in real time. SET ADB_CONFIG REPLICATION_SWITCH_TIME_RANGE=`23:00, 23:30`;

Scale a Data Warehouse Edition cluster and change the cluster mode

IN condition limits

MAX_IN_ITEMS_COUNT

Description Sets the maximum number of items in an IN condition. Valid values: positive integers greater than 0. For clusters with kernel versions earlier than 3.2.8, the default value is 4000. For clusters with kernel version 3.2.8 or later, the default value is 20000.

SET ADB_CONFIG MAX_IN_ITEMS_COUNT=4000;

Writes and queries

Maximum SELECT columns

MAX_SELECT_ITEMS_COUNT

Description The maximum number of columns in a SELECT statement. Default value: 1024. Increasing this value may affect cluster stability. We do not recommend that you change this value. SET ADB_CONFIG MAX_SELECT_ITEMS_COUNT=1000; Reference

Query timeout

QUERY_TIMEOUT

Description The timeout period for query execution. Default value: 1800000 ms (30 minutes). This parameter controls only the execution timeout of SQL statements. It does not affect the connection timeout or session idle timeout. SET ADB_CONFIG QUERY_TIMEOUT=1000;

Query optimization/Runtime policy

DYNAMIC_FILTER_WAIT_TIME_IN_MS

Description The wait time threshold for dynamic filtering. This parameter controls the wait duration for building dynamic filters in join operations, balancing query performance and resource consumption. SHOW ADB_CONFIG KEY=DYNAMIC_FILTER_WAIT_TIME_IN_MS;

INSERT, UPDATE, DELETE timeout

INSERT_SELECT_TIMEOUT

Description The maximum execution time for INSERT, UPDATE, and DELETE statements at the cluster level. Default value: 24*3600000. Valid values: integers greater than 0. Unit: milliseconds. SET ADB_CONFIG INSERT_SELECT_TIMEOUT=3600000; Reference

Limits

Predicate pushdown disable

Parameters Kernel version 3.1.4 or later: FILTER_NOT_PUSHDOWN_COLUMNS Kernel versions earlier than 3.1.4: NO_INDEX_COLUMNS Description Disables predicate pushdown for specific columns at the cluster level.

Disable predicate pushdown for specific columns at the cluster level.

  • Kernel version 3.1.4 or later: SET ADB_CONFIG FILTER_NOT_PUSHDOWN_COLUMNS=[Schema1.tableName1:colName1|colName2;Schema2.tableName2:colName1|colName2]

  • Kernel versions earlier than 3.1.4: SET ADB_CONFIG NO_INDEX_COLUMNS=[tableName1.colName1;colName2,tableName2.colName1]

Filter conditions without pushdown

Query execution mode

QUERY_TYPE

Description Switches the query execution mode of the instance. Valid values: interactive batch Cluster Edition clusters in reserved mode and Data Lake Edition clusters do not support switching the query execution mode.

SET ADB_CONFIG QUERY_TYPE=interactive;

Query execution modes

Query queue concurrency

XIHE_ENV_QUERY_ETL_MAX_CONCURRENT_SIZE

The maximum number of concurrently running queries in the LOWEST queue on a single frontend node. Default value: 20.

SET ADB_CONFIG XIHE_ENV_QUERY_ETL_MAX_CONCURRENT_SIZE=20;

Priority queues and concurrency of interactive resource groups

XIHE_ENV_QUERY_ETL_MAX_QUEUED_SIZE

The maximum number of queued queries in the LOWEST queue 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 concurrently running queries in the LOW queue 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 queued queries in the LOW queue 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 concurrently running queries in the NORMAL queue on a single frontend node. Default value: 20. When the limit is exceeded, new queries are queued. If the queue is full, a "Too many queued queries" error is returned. You can increase this value or create custom resource groups to distribute the load.

SET ADB_CONFIG XIHE_ENV_QUERY_NORMAL_MAX_CONCURRENT_SIZE=20;

XIHE_ENV_QUERY_NORMAL_MAX_QUEUED_SIZE

The maximum number of queued queries in the NORMAL queue 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 concurrently running queries in the HIGH queue 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 queued queries in the HIGH queue on a single frontend node. Default value: 400.

SET ADB_CONFIG XIHE_ENV_QUERY_HIGH_MAX_QUEUED_SIZE=400;

XIHE BSP job priority

QUERY_PRIORITY

The priority of BSP jobs. Valid values:

  • HIGH

  • NORMAL (default)

  • LOW

  • LOWEST

SET ADB_CONFIG QUERY_PRIORITY=HIGH;

Parameters

The maximum ACUs used by XIHE BSP job settings

ELASTIC_JOB_MAX_ACU

The maximum number of ACUs that a single XIHE BSP job can use. Default value: 9. Minimum value: 3. Valid values: [3, maximum resources of the job-type resource group].

SET ADB_CONFIG ELASTIC_JOB_MAX_ACU=20;

The query timeout for XIHE BSP jobs

BATCH_QUERY_TIMEOUT

The timeout period for XIHE BSP jobs. Default value: 7200000 ms. Valid values: integers greater than 0. Unit: milliseconds.

SET ADB_CONFIG BATCH_QUERY_TIMEOUT=3600000 ;

External table import: OSS

HIVE_SPLIT_ASYNC_GENERATION_ENABLED

Description Specifies whether to asynchronously submit Hive Split tasks to a queue when Hive generates an execution plan. Valid values: true: Yes. false (default): No.

SET ADB_CONFIG HIVE_SPLIT_ASYNC_GENERATION_ENABLED=true;

None

External table import: MaxCompute

SQL_OUTPUT_BATCH_SIZE

The number of rows per batch during data import. Valid values: integers greater than 0.

SET ADB_CONFIG SQL_OUTPUT_BATCH_SIZE = 6000;

Import and export

ENABLE_ODPS_MULTI_PARTITION_PART_MATCH

Specifies whether to pre-traverse and retrieve the number of records in each MaxCompute partition.

SET ADB_CONFIG ENABLE_ODPS_MULTI_PARTITION_PART_MATCH=false;

ASYNC_GET_SPLIT

Specifies whether to asynchronously submit tasks to a queue by optimizing Split loading performance when MaxCompute generates an execution plan. Valid values:

  • true: Yes.

  • false (default): No.

Note This parameter is supported only in kernel version 3.1.10.1 and later.

SET ADB_CONFIG ASYNC_GET_SPLIT=true;

BUILD auto scheduling

RC_CSTORE_BUILD_SCHEDULE_PERIOD

Description Restricts the time period for BUILD task scheduling. This does not restrict the time period for BUILD task execution. Valid values: integers from 0 to 24. SET ADB_CONFIG RC_CSTORE_BUILD_SCHEDULE_PERIOD=`6,8`; Reference

Configure automatic scheduling for BUILD jobs

BUILD scheduling priority

Description Allows you to configure the BUILD scheduling priority for one or more tables. The priority remains effective until you reconfigure it. The BUILD scheduling priority is controlled by the task_priority parameter. Valid values: integers. Default value: 0.

Allows you to configure the BUILD scheduling priority for a single table or multiple tables. The priority remains effective until you reconfigure it.

The BUILD scheduling priority is controlled by the parametertask_priority parameter. Valid values: integers. Default value: 0.

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

BUILD

Elastic import

RC_ELASTIC_JOB_SCHEDULER_ENABLE

You must manually enable the elastic import switch for elastic import.

SET ADB_CONFIG RC_ELASTIC_JOB_SCHEDULER_ENABLE=true; Reference

REMOTE_CALL function

XIHE_REMOTE_CALL_SERVER_ENDPOINT

The internal endpoint of Function Compute for remotely calling custom functions in Function Compute through the REMOTE_CALL function. For more information, see Service endpoints.

SET ADB_CONFIG XIHE_REMOTE_CALL_SERVER_ENDPOINT="1234567890000****.cn-zhangjiakou-internal.fc.aliyuncs.com"

UDFs

XIHE_REMOTE_CALL_SERVER_AK

The AccessKey ID of the Alibaba Cloud account or RAM user that owns the Function Compute service when you use the REMOTE_CALL function to remotely invoke custom functions.

SET ADB_CONFIG XIHE_REMOTE_CALL_SERVER_AK=************;

XIHE_REMOTE_CALL_SERVER_SK

The AccessKey Secret of the Alibaba Cloud account or RAM user that owns the Function Compute service when you use the REMOTE_CALL function to remotely invoke custom functions.

SET ADB_CONFIG XIHE_REMOTE_CALL_SERVER_SK=************;

XIHE_REMOTE_CALL_COMPRESS_ENABLED

Specifies whether to use GZIP compression to compress data before sending it to Function Compute when you use the REMOTE_CALL function to remotely invoke custom functions.

SET ADB_CONFIG REMOTE_CALL_COMPRESS_ENABLED=true;

XIHE_REMOTE_CALL_MAX_BATCH_SIZE

The number of rows of data sent to Function Compute when you use the REMOTE_CALL function to remotely invoke custom functions.

SET ADB_CONFIG XIHE_REMOTE_CALL_MAX_BATCH_SIZE=500000;

Scan concurrency control

  • true (default): Enables scan concurrency control.

  • false: Disables scan concurrency control.

AnalyticDB for MySQL allows you to configure the scan concurrency quota to prevent node instability caused by excessive scan concurrency that consumes too many resources. Valid values:

  • true (Default value): Enable scan concurrency control.

  • false: Disable scan concurrency control.

SET ADB_CONFIG SPLIT_FLOW_CONTROL_ENABLED=true;

Split flow control

AnalyticDB for MySQL supports dynamically adjusting the scan concurrency quota of tasks based on the overall scan concurrency quota of each node. Valid values:

  • true: Enables dynamic adjustment of task scan concurrency control.

  • false (default): Disables dynamic adjustment of task scan concurrency control.

AnalyticDB for MySQL supports dynamically adjusting the scan concurrency quota of tasks based on the overall scan concurrency quota of each node. Valid values:

  • true: Enable dynamic adjustment of task scan concurrency control.

  • false (Default value): Disable dynamic adjustment of task scan concurrency control.

SET ADB_CONFIG NODE_LEVEL_SPLIT_FLOW_CONTROL_ENABLED=true;

MIN_RUNNING_SPLITS_LIMIT_PER_TASK

The minimum scan concurrency quota per task. Default value: 1. Valid values: [1, TARGET_RUNNING_SPLITS_LIMIT_PER_TASK].

SET ADB_CONFIG MIN_RUNNING_SPLITS_LIMIT_PER_TASK=24;

TARGET_RUNNING_SPLITS_LIMIT_PER_TASK

The target (midpoint) scan concurrency quota per task. The system increases or decreases the scan concurrency quota based on this value. Default value: 32. Valid values: [MIN_RUNNING_SPLITS_LIMIT_PER_TASK, MAX_RUNNING_SPLITS_LIMIT_PER_TASK].

TARGET_RUNNING_SPLITS_LIMIT_PER_TASK=32;

MAX_RUNNING_SPLITS_LIMIT_PER_TASK

The maximum scan concurrency quota per task. Default value: 64. Valid values: greater than TARGET_RUNNING_SPLITS_LIMIT_PER_TASK.

SET ADB_CONFIG MAX_RUNNING_SPLITS_LIMIT_PER_TASK=128;

The default scan concurrency quota for storage nodes is 256. An excessively high or low value may affect cluster performance. We recommend that you do not change the default value.

The default scan concurrency quota for storage nodes is 256. A value that is too large or too small may affect cluster performance. We recommend that you do not change the default value.

SET ADB_CONFIG WORKER_MAX_RUNNING_SOURCE_SPLITS_PER_NODE=256;

The default scan concurrency quota for compute nodes is 256. An excessively high or low value may affect cluster performance. We recommend that you do not change the default value.

The default scan concurrency quota for compute nodes is 256. A value that is too large or too small may affect cluster performance. We recommend that you do not change the default value.

SET ADB_CONFIG EXECUTOR_MAX_RUNNING_SOURCE_SPLITS_PER_NODE=256;

Logical view case sensitivity

VIEW_OUTPUT_NAME_CASE_SENSITIVE

Description Specifies whether logical view names are case-sensitive. Valid values: true: Case-sensitive. false (default): Case-insensitive.

SET ADB_CONFIG VIEW_OUTPUT_NAME_CASE_SENSITIVE=true;

CREATE VIEW

Description Manually enables the Multi-Statement feature to execute multiple SQL statements in sequence. Valid values: true: Enabled. false (default): Disabled.

ALLOW_MULTI_QUERIES

Manually enable the Multi-Statement feature to execute multiple SQL statements in sequence. Valid values:

  • true: Enable.

  • false (Default value): Disable.

SET ADB_CONFIG ALLOW_MULTI_QUERIES=true;

Multi-statement

Enable binary logging

BINLOG_ENABLE

Description For clusters with kernel versions earlier than 3.2.0.0, you must manually enable the Binlog feature before you can enable Binlog for tables. For clusters with kernel version 3.2.0.0 or later, the Binlog feature is enabled by default. You do not need to configure this parameter. SET ADB_CONFIG BINLOG_ENABLE=true;

Refresh materialized views

The database used to store temporary cache tables for paging queries. If not specified, the internal database of the current connection is used.

PAGING_CACHE_SCHEMA

Specify the database for storing temporary paging cache tables. If not specified, the internal database of the current connection is used.

SET ADB_CONFIG PAGING_CACHE_SCHEMA=paging_cache;

Paging cache (performance optimization for deep paged queries)

PAGING_CACHE_MAX_TABLE_COUNT

The maximum number of temporary cache tables. Creating new caches fails when this limit is exceeded. Default value: 100. Valid values: integers greater than 0.

SET ADB_CONFIG PAGING_CACHE_MAX_TABLE_COUNT=100;

PAGING_CACHE_EXPIRATION_TIME

The cache expiration time threshold. Caches that have not been accessed within the specified period are automatically cleaned up. Default value: 600. Valid values: integers greater than 0. Unit: seconds.

SET ADB_CONFIG PAGING_CACHE_EXPIRATION_TIME=600;

PAGING_CACHE_ENABLE

Specifies whether to globally disable the Paging Cache feature. Valid values:

  • true (default): Enabled.

  • false: Disabled.

SET ADB_CONFIG PAGING_CACHE_ENABLE=false;

Specify the table engine

RC_DDL_ENGINE_REWRITE_XUANWUV2

Description Specifies the table engine at the cluster level. Valid values: true (default): Existing tables retain their current engine. New tables use XUANWU_V2 by default. Even if you explicitly specify ENGINE=XUANWU when creating a table, the engine is automatically changed to XUANWU_V2. false: Existing tables retain their current engine. New tables use XUANWU by default.

SET ADB_CONFIG RC_DDL_ENGINE_REWRITE_XUANWUV2=true;

Configure the table engine

Common hints

Category

Parameter

Description

Example

References

Query timeout

QUERY_TIMEOUT

Description The timeout period for query execution. Default value: 1800000 ms (30 minutes). This parameter controls only the execution timeout of SQL statements. It does not affect the connection timeout or session idle timeout. SET ADB_CONFIG QUERY_TIMEOUT=1000;

Writes and queries

INSERT, UPDATE, DELETE timeout

INSERT_SELECT_TIMEOUT

Description The maximum execution time for INSERT, UPDATE, and DELETE statements at the cluster level. Default value: 24*3600000. Valid values: integers greater than 0. Unit: milliseconds. SET ADB_CONFIG INSERT_SELECT_TIMEOUT=3600000; Reference

Limits

Predicate pushdown disable

Parameters Kernel version 3.1.4 or later: FILTER_NOT_PUSHDOWN_COLUMNS Kernel versions earlier than 3.1.4: NO_INDEX_COLUMNS Description Disables predicate pushdown for specific columns at the cluster level.

Disable predicate pushdown for specific columns at the query level.

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

  • Kernel versions earlier than 3.1.4: /*+ NO_INDEX_COLUMNS=[tableName1.colName1;colName2,tableName2.colName1] */

Filter conditions without pushdown

BUILD scheduling priority

BUILD_TASK_PRIORITY

Modifies the BUILD task scheduling priority. Currently, you can only use hints to configure the BUILD scheduling priority for individual tables. Default value: 0. Valid values: integers greater than or equal to 0. A larger value indicates a higher priority.

/*+ BUILD_TASK_PRIORITY = 2*/ BUILD TABLE db.table;

Configure scheduling priorities for BUILD jobs

Elastic import

Enables elastic import and configures the job-type resource group for running elastic import tasks.

Select Elastic Import and configure the job resource group for elastic import tasks.

/*+ 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;

The Hash Join implementation uses the right table for building. Left Join does not reorder the left and right tables. When the right table contains a large amount of data, this can cause slow execution and excessive memory consumption. You can add a hint to instruct the optimizer to convert Left Join to Right Join based on resource consumption. Valid values:

  • true: Enabled.

  • false (default): Disabled.

  • Kernel version 3.1.8 or later: O_CBO_RULE_SWAP_OUTER_JOIN

  • Kernel versions earlier than 3.1.8: LEFT_TO_RIGHT_ENABLED

The Hash Join implementation uses the right table for building. Left Join does not reorder the left and right tables. When the right table is large, this can cause slow execution and excessive memory consumption. You can add a hint to instruct the optimizer to convert Left Join to Right Join based on resource usage. Valid values:

  • true: Enable.

  • false (Default value): Disable.

  • /*+ O_CBO_RULE_SWAP_OUTER_JOIN=true*/

  • /*+ LEFT_TO_RIGHT_ENABLED=true*/

Change LEFT JOIN to RIGHT JOIN

REORDER_JOINS

AnalyticDB for MySQL enables automatic join reordering by default. You can manually adjust the join order based on data characteristics so that the query follows the join order specified in the SQL statement. Valid values:

  • true (default): Enables automatic join reordering.

  • false: Disables automatic join reordering.

/*+ REORDER_JOINS=false*/

Manually adjust the join order

AGGREGATION_PATH_TYPE

When using two-phase aggregation, a large number of groups in group-by aggregation consumes significant computing resources. You can use this hint to skip local aggregation and perform final aggregation directly. Valid values:

  • single_agg: Skips local aggregation.

  • auto (default): The optimizer automatically determines whether to skip local aggregation.

/*+ AGGREGATION_PATH_TYPE=single_agg*/

Grouping and aggregation query optimization

Each compute task is split into multiple concurrent tasks to fully utilize computing resources. You can use this hint to set the concurrency. Default value: 32. Valid values: integers greater than 0.

HASH_PARTITION_COUNT

Each compute task is split into multiple concurrent tasks to make full use of computing resources. You can use this hint to set the concurrency. Default value: 32. Valid values: positive integers.

/*+ HASH_PARTITION_COUNT=32*/

None

BATCH_HASH_PARTITION_COUNT

Default value: 32. Valid values: integers greater than 0.

Important

In batch mode (query_execution_type=batch), setting this value too high may cause an excessive number of concurrent tasks on a node, leading to memory pool overflow. When the cluster has more than 32 compute nodes, we recommend that you set this parameter to the number of compute nodes to avoid disk limit issues.

/*+ BATCH_HASH_PARTITION_COUNT=64, QUERY_EXECUTION_TYPE=batch */ SELECT ...

TASK_WRITER_COUNT

The concurrency of INSERT INTO SELECT import tasks. When the worker load is too high, you can reduce this value. Default value: 16. Valid values: integers greater than 0.

/*+ TASK_WRITER_COUNT=8*/

CTE_EXECUTION_MODE

Specifies whether to enable CTE execution optimization. When enabled, a CTE subquery that is referenced multiple times is executed only once, improving query performance. Valid values:

  • shared: Enables CTE execution optimization.

  • inline (default): Disables CTE execution optimization.

/*+ CTE_EXECUTION_MODE=shared*/

WITH

Query condition limits

QUERY_MAX_SHUFFLE_DATA_SIZE_MB

The maximum Shuffle data size for a query. By default, no error is triggered regardless of the data volume. If this parameter is set, the system terminates the query and reports an error when the data volume exceeds the threshold. Valid values: integers greater than 0. Unit: MB.

/*+ QUERY_MAX_SHUFFLE_DATA_SIZE_MB=1024*/

None

MAX_SELECT_ITEMS_COUNT

Description The maximum number of columns in a SELECT statement. Default value: 1024. Increasing this value may affect cluster stability. We do not recommend that you change this value. SET ADB_CONFIG MAX_SELECT_ITEMS_COUNT=1000; Reference

MAX_IN_ITEMS_COUNT

Description Sets the maximum number of items in an IN condition. Valid values: positive integers greater than 0. For clusters with kernel versions earlier than 3.2.8, the default value is 4000. For clusters with kernel version 3.2.8 or later, the default value is 20000.

/*+ MAX_IN_ITEMS_COUNT=1000*/

MAX_WHERE_ITEMS_COUNT

Sets the maximum number of items in a WHERE clause. Default value: 256. Valid values: integers greater than 0.

/*+ MAX_WHERE_ITEMS_COUNT=512*/

XIHE BSP job priority

QUERY_PRIORITY

The priority of BSP jobs. Valid values:

  • HIGH

  • NORMAL (default)

  • LOW

  • LOWEST

/*+ QUERY_PRIORITY=HIGH*/

Parameters

The maximum ACUs used by XIHE BSP job settings

ELASTIC_JOB_MAX_ACU

The maximum number of ACUs that a single XIHE BSP job can use. Default value: 9. Minimum value: 3. Valid values: [3, maximum resources of the job-type resource group].

/*+ ELASTIC_JOB_MAX_ACU=20*/

The query timeout for XIHE BSP jobs

BATCH_QUERY_TIMEOUT

The timeout period for XIHE BSP jobs. Default value: 7200000 ms. Valid values: integers greater than 0. Unit: milliseconds.

/*+ BATCH_QUERY_TIMEOUT=3600000*/

OSS external tables

OUTPUT_FILENAME

Customizes the file name stored in OSS when you export data through OSS external tables.

/*+ OUTPUT_FILENAME=output.csv*/

Export data to OSS

SQL_OUTPUT_OSS_FILE_HEAD_ENABLE

Specifies whether to include column names in the exported data files in OSS. By default, exported files contain only data without column names. Valid values:

  • true: Include column names.

  • false (default): Do not include column names.

/*+ SQL_OUTPUT_OSS_FILE_HEAD_ENABLE=true*/

HIVE_SPLIT_ASYNC_GENERATION_ENABLED

Description Specifies whether to asynchronously submit Hive Split tasks to a queue when Hive generates an execution plan. Valid values: true: Yes. false (default): No.

/*+ HIVE_SPLIT_ASYNC_GENERATION_ENABLED=true*/

Import OSS data using external tables

FAST_PARQUET_READER_ENABLE

Specifies whether to fall back to the native Parquet reader when the statistics in a Parquet file are incorrect. Valid values:

  • true (default): Yes.

  • false: No.

/*+ FAST_PARQUET_READER_ENABLE=true*/

OSS_VECTORIZED_PARQUET_READER_ENABLE

Specifies whether to enable the Parquet vectorized read switch when no NULL values exist in the data. Valid values:

  • true: Yes.

  • false (default): No.

/*+ OSS_VECTORIZED_PARQUET_READER_ENABLE=true*/

OSS_VECTORIZED_PARQUET_READER_NULL_SCENE_ENABLE

Specifies whether to enable the Parquet vectorized read switch when NULL values exist in the data. Valid values:

  • true: Yes.

  • false (default): No.

/*+ OSS_VECTORIZED_PARQUET_READER_NULL_SCENE_ENABLE=true*/

Specifies whether to load Hudi metadata. Valid values:

  • true: Yes.

  • false (default): No.

Specifies whether to load Hudi metadata. Valid values:

  • true: Yes.

  • false (Default value): No.

/*+ HUDI_METADATA_TABLE_ENABLED=true*/

HUDI_QUERY_TYPE

Sets the query mode for Hudi tables. Valid values:

  • snapshot: Queries all data that has been committed or compacted at the specified time.

  • read_optimized (default): Queries data after the last commit or compaction.

/*+ HUDI_QUERY_TYPE=snapshot*/

HUDI_REALTIME_SKIP_MERGE

Specifies whether to skip merging base files and log files when querying Hudi table data in snapshot mode. Valid values:

  • true: Yes.

  • false (default): No.

/*+ HUDI_REALTIME_SKIP_MERGE=true*/

The maximum split size. Default value: 128. Unit: MB.

The maximum split size. Default value: 128. Unit: MB.

/*+ HUDI_MAX_SPLIT_SIZE=128*/

HUDI_SPLIT_PARALLEL_GENERATION_ENABLED

Specifies whether to generate splits in parallel. Valid values:

  • true (default): Yes.

  • false: No.

/*+ HUDI_SPLIT_PARALLEL_GENERATION_ENABLED=true*/

HUDI_DATA_SKIPPING_ENABLED

Uses statistics from the Hudi MetaTable to skip splits that do not need to be read, improving query performance. Valid values:

  • true: Yes.

  • false (default): No.

/*+ HUDI_DATA_SKIPPING_ENABLED=true*/

HUDI_SPLIT_ASYNC_GENERATION_ENABLED

Specifies whether to asynchronously generate Hudi splits during execution plan generation. Valid values:

  • true (default): Yes.

  • false: No.

/*+ HUDI_SPLIT_ASYNC_GENERATION_ENABLED=true*/

RDS MySQL external tables

JDBC_SCAN_SPLITS

The number of splits when performing a TableScan through JDBC. Default value: 1. Valid values: 1 to 100.

/*+ JDBC_SCAN_SPLITS=1*/

Import RDS MySQL data by using an external table

JDBC_SPLIT_COLUMN

The column used to split data when reading RDS MySQL external tables.

/*+ JDBC_SPLIT_COLUMN=column1*/

JDBC_INSERT_DIRECTLY

When writing data to RDS MySQL external tables, data is written to a temporary table first and then to the target table by default. You can use this hint to write data directly to the target table. However, if any error occurs during writing, the target table may contain dirty data. Valid values:

  • true: Yes.

  • false (default): No.

/*+ JDBC_INSERT_DIRECTLY=true*/

Tablestore external tables

Specifies whether to use INSERT statements instead of UPDATE statements. Valid values:

  • true: Yes.

  • false (default): No.

Specifies whether to use INSERT statements instead of UPDATE statements. Valid values:

  • true: Yes.

  • false (Default value): No.

/*+ OTS-INSERT-AS-UPDATE=true*/

Query and import data from Tablestore

MaxCompute external tables

ODPS_SPLIT_LIMIT

The maximum number of splits when reading data through Tunnel. Default value: 1000. Valid values: 1 to 1000.

/*+ ODPS_SPLIT_LIMIT=1000*/

Import MaxCompute data using external tables

IGNORE_PARTITION_CACHE

When executing queries with partition conditions, retrieves partition metadata directly from MaxCompute tables instead of using cached partition metadata. Valid values:

  • true: Yes.

  • false (default): No.

/*+ IGNORE_PARTITION_CACHE=true*/

ROWS_PER_SPLIT

The maximum number of rows per split when reading data through Tunnel. Default value: 500000. Valid values: 10000 to 500000.

/*+ ROWS_PER_SPLIT=500000*/

STORAGE_API_ENABLED

Specifies whether to use the MaxCompute Storage API to read MaxCompute data. The Storage API provides significantly better read performance than the traditional Tunnel. Valid values:

  • true: Yes.

  • false (default): No.

/*+ STORAGE_API_ENABLED=true*/

APLIT_BYTE_SIZE

The maximum size per split when reading data through the MaxCompute Storage API. Default value: 256. Unit: MB.

/*+ APLIT_BYTE_SIZE=256*/

MAX_BATCH_ROW_COUNT

The maximum number of rows per split when reading data through the MaxCompute Storage API. Default value: 1024.

/*+ MAX_BATCH_ROW_COUNT=1024*/

PAGE_BATCH_SIZE

The maximum number of rows per page when reading data through the MaxCompute Storage API. Default value: 1024.

/*+ PAGE_BATCH_SIZE=1024*/

MAX_ALLOCATION_PER_SPLIT

The maximum peak memory allocated per split when reading data through the MaxCompute Storage API. Default value: 300. Unit: MB.

/*+ MAX_ALLOCATION_PER_SPLIT=300*/

ASYNC_GET_SPLIT

Specifies whether to asynchronously submit tasks to a queue by optimizing Split loading performance when MaxCompute generates an execution plan. Valid values:

  • true: Yes.

  • false (default): No.

Note This parameter is supported only in kernel version 3.1.10.1 and later.

/*+ ASYNC_GET_SPLIT=true*/

Scan concurrency control

SPLIT_FLOW_CONTROL_ENABLED

  • true (default): Enables scan concurrency control.

  • false: Disables scan concurrency control.

/*+ SPLIT_FLOW_CONTROL_ENABLED=true*/ SELECT * FROM table;

Split flow control

MIN_RUNNING_SPLITS_LIMIT_PER_TASK

The minimum scan concurrency quota per task. Default value: 1. Valid values: [1, TARGET_RUNNING_SPLITS_LIMIT_PER_TASK].

/*+ MIN_RUNNING_SPLITS_LIMIT_PER_TASK=10*/SELECT * FROM orders;

TARGET_RUNNING_SPLITS_LIMIT_PER_TASK

The target (midpoint) scan concurrency quota per task. The system increases or decreases the scan concurrency quota based on this value. Default value: 32. Valid values: [MIN_RUNNING_SPLITS_LIMIT_PER_TASK, MAX_RUNNING_SPLITS_LIMIT_PER_TASK].

/*+ TARGET_RUNNING_SPLITS_LIMIT_PER_TASK=32*/SELECT * FROM adb_test;

MAX_RUNNING_SPLITS_LIMIT_PER_TASK

The maximum scan concurrency quota per task. Default value: 64. Valid values: greater than TARGET_RUNNING_SPLITS_LIMIT_PER_TASK.

/*+ MAX_RUNNING_SPLITS_LIMIT_PER_TASK=100*/SELECT * FROM adb_test;

Enables the Paging Cache feature and manually specifies a paging_id to identify the cache for a group of related paging queries (queries with the same pattern but different LIMIT and OFFSET parameters).

PAGING_ID

Enable the paging cache feature and manually specifypaging_id to identify a group of related paging queries (that is, a group of queries with the same pattern but differentLIMIT and OFFSETparameter values).

/*PAGING_ID=paging123*/ SELECT * FROM t_order ORDER BY id LIMIT 0, 100;

Paging cache (performance optimization for deep paged queries)

PAGING_CACHE_ENABLED

Enables the Paging Cache feature and automatically generates a paging_id based on the SQL pattern to identify the cache for a group of related paging queries. Valid values:

  • true: Enables the Paging Cache feature.

  • false (default): Disables the Paging Cache feature.

/*PAGING_CACHE_ENABLED=true*/ SELECT * FROM t_order ORDER BY id LIMIT 0, 100;

PAGING_CACHE_VALIDITY_INTERVAL

Sets the cache validity period. After this period, the cache expires. If the cache is not accessed within one hour after expiration, the system automatically deletes the corresponding temporary cache table. Valid values: integers greater than 0. Unit: seconds. This parameter must be used together with paging_cache_enabled.

/*PAGING_CACHE_ENABLED=true,PAGING_CACHE_VALIDITY_INTERVAL=300*/ SELECT * FROM t_order ORDER BY id LIMIT 0, 100;

INVALIDATE_PAGING_CACHE

Specifies whether to clear the paging query cache for a specified pattern. Valid values:

  • true: Yes.

  • false (default): No.

This parameter must be used together with paging_id or paging_cache_enabled.

/*PAGING_CACHE_ENABLED=true,INVALIDATE_PAGING_CACHE=true*/ SELECT * FROM t_order ORDER BY id LIMIT 0, 100;

Specify the table engine

RC_DDL_ENGINE_REWRITE_XUANWUV2

Description Specifies the table engine at the cluster level. Valid values: true (default): Existing tables retain their current engine. New tables use XUANWU_V2 by default. Even if you explicitly specify ENGINE=XUANWU when creating a table, the engine is automatically changed to XUANWU_V2. false: Existing tables retain their current engine. New tables use XUANWU by default.

/*+ RC_DDL_ENGINE_REWRITE_XUANWUV2=true */

Configure the table engine

Other

RESOURCE_GROUP

Specifies the resource group for a query. If not specified, the resource group bound to the database account is used. If no resource group is bound to the account, the default resource group is used.

/*+ RESOURCE_GROUP=my_group_name*/

None

DML_EXCEPTION_TO_NULL_ENABLED

Specifies whether to throw an exception when invalid values are encountered during INSERT SELECT operations. Valid values:

  • true: Does not throw an exception. Writes NULL values instead.

  • false (default): Throws an exception.

/*+ DML_EXCEPTION_TO_NULL_ENABLED=true*/

DISPLAY_HINT

Used to tag queries, for example, to identify queries from different business sources.

/*+ DISPLAY_HINT=from_user_123*/

FAQ

How do I remove a configuration parameter?

If you have set a configuration parameter by using SET ADB_CONFIG key=value; and want to restore the parameter to the default value, use the following method.

Method

Example

SET ADB_CONFIG REMOVE key;
SET ADB_CONFIG REMOVE QUERY_TIMEOUT; -- Restore the query timeout to the default value.

After the command is executed, you can run SHOW ADB_CONFIG KEY=key; to verify that the parameter has been restored to the default value.