Computational Layer Variables

PolarDB-X operates on a decoupled storage and computation architecture. Here, we list common CN (Compute Node) variables, some of which are configurable via the console.

Variable Name Restart Required Default Value Range Notes
PLAN_CACHE No TRUE [TRUE\ FALSE] Switch to enable or disable plan caching
ENABLE_RECYCLEBIN No FALSE [TRUE\ FALSE] Switch to activate the recycle bin feature
SHOW_TABLES_CACHE No FALSE [TRUE\ FALSE] Determines if the results from SHOW TABLES should be cached
MERGE_CONCURRENT No FALSE [TRUE\ FALSE] Switch for executing in full parallel mode, mainly affecting parallelism for DDL and simple fully pushed-down queries
MERGE_UNION No FALSE [TRUE\ FALSE] When off, physical SQL will not optimize using UNION and will execute serially when pushed down
MERGE_UNION_SIZE No -1 [0-10000] Number of physical SQL statements to merge using UNION, automatically deduced based on available connections in the pool by default
TABLE_META_CACHE_EXPIRE_TIME No 300 [0-180000] Time before metadata cache expires
COLUMN_LABEL_INSENSITIVE No TRUE [FALSE\ TRUE] Determines if the case sensitivity of column labels is insensitive
RECORD_SQL No TRUE [FALSE\ TRUE] Toggle for SQL auditing logs
SOCKET_TIMEOUT No 900000 [0~3600000] Timeout duration for physical SQL statements
TRANSACTION_POLICY No TSO [XA\ TSO\ TSO_READONLY] Specifies the transaction policy
SHARE_READ_VIEW No FALSE [TRUE\ FALSE] Switch to enable shared ReadView
ENABLE_TRX_SINGLE_SHARD_OPTIMIZATION No TRUE [TRUE\ FALSE] Switch for optimizing single-shard transactions
GET_TSO_TIMEOUT No 10 [1-1800] Timeout for obtaining TSO timestamps
MAX_TRX_DURATION No 28800 [1-180000] Maximum duration before a physical transaction times out
TRANSACTION_ISOLATION No REPEATABLE_READ [READ_UNCOMMITTED\ READ_COMMITTED\ REPEATABLE_READ\ SERIALIZABLE] Level of transaction isolation
GROUP_CONCURRENT_BLOCK No TRUE [TRUE\ FALSE] Strategy for concurrent execution at the database level in non-MPP mode
SEQUENTIAL_CONCURRENT_POLICY No FALSE [TRUE\ FALSE] Strategy for sequential concurrent execution in non-MPP mode
DML_SKIP_DUPLICATE_CHECK_FOR_PK No TRUE [TRUE\ FALSE] Whether to skip primary key conflict checks during DML operations
DML_SKIP_CRUCIAL_ERR_CHECK No FALSE [TRUE\ FALSE] Allows transactions with DML errors to commit
DML_USE_RETURNING No TRUE [TRUE\ FALSE] Whether to use the RETURNING optimization
BROADCAST_DML No FALSE [TRUE\ FALSE] Allows writes to broadcast tables without utilizing distributed transactions
SEQUENCE_STEP No 10000 [1-10000000] Step size for SEQUENCE, defaulted to 100,000
MERGE_DDL_TIMEOUT No 0 [1-10000000] Timeout for DDL physical connection, set to 0 by default indicating no timeout
MERGE_DDL_CONCURRENT No FALSE [FALSE\ TRUE] Whether DDL should operate in full parallel mode, with database-level concurrency by default
SLOW_SQL_TIME No 1000 [1-180000] Threshold for identifying slow SQL queries
LOAD_DATA_BATCH_INSERT_SIZE No 1024 [1-180000] Number of records per batch insert for LOAD DATA
LOAD_DATA_CACHE_BUFFER_SIZE No 60 [1-180000] Cache size for LOAD DATA, set to 60Mb by default for flow control
MAX_ALLOWED_PACKET No 16777216 [4194304-33554432] Maximum packet size allowed
KILL_CLOSE_STREAM No FALSE [FALSE\ TRUE] Whether to enable early termination of streaming physical connections
ALLOW_SIMPLE_SEQUENCE No FALSE [FALSE\ TRUE] Whether to allow the use of simple sequence
MAX_PARAMETERIZED_SQL_LOG_LENGTH No 5000 [1-1000000] The maximum length for logging parameterized SQL queries
FORBID_EXECUTE_DML_ALL No TRUE [TRUE\ FALSE] Whether to prohibit full-table DELETE or UPDATE operations
GROUP_SEQ_CHECK_INTERVAL Yes 60 [1-36000] The frequency, in seconds, for checking explicit value insertions
JOIN_BLOCK_SIZE Yes 300 [1-100000] The number of IN values for BKAJOIN operations when not dynamically pruned
LOOKUP_JOIN_MAX_BATCH_SIZE Yes 6400 [1-100000] The maximum batch size for IN values in BKAJOIN operations
LOOKUP_JOIN_MIN_BATCH_SIZE Yes 100 [1-100000] The minimum batch size for IN values in BKAJOIN operations
PURGE_TRANS_INTERVAL Yes 300 [1-180000] Interval for purging transaction logs
PURGE_TRANS_BEFORE Yes 1800 [1-180000] How far back, in time, transaction logs should be purged
ENABLE_BACKGROUND_STATISTIC_COLLECTION No TRUE [TRUE\ FALSE] Enables the collection of background statistics
GENERAL_DYNAMIC_SPEED_LIMITATION No -1 [-1-10000000] Dynamic speed limitation for data backfilling and validation, defaults to -1
PARALLELISM No -1 [1-1024] The level of parallelism for each machine, normally inferred from system specs
LOGICAL_DB_TIME_ZONE No SYSTEM [SYSTEM\ ±HH:mm] The time zone setting for the database
MPP_PARALLELISM No -1 [1-1024] Concurrency level for MPP execution mode, typically deduced from system specs
DATABASE_PARALLELISM No 0 [0-1024] Number of concurrent SQL statements allowed on a single DN for query processing
POLARDBX_PARALLELISM No 0 [0-1024] The maximum concurrency per query on a CN, generally equals the number of CPU cores
MPP_METRIC_LEVEL No 3 [0\ 1\ 2\ 3] The granularity of statistical information gathered during computation, with higher levels indicating finer detail
ENABLE_COMPLEX_DML_CROSS_DB No TRUE [TRUE\ FALSE] Support for complex DML operations across different databases
PER_QUERY_MEMORY_LIMIT Yes -1 [-1-9223372036854775807] Memory limit per query, typically a third of the global connection pool
ENABLE_SPILL No FALSE [FALSE\ TRUE] Toggle for allowing temporary tables to spill over to disk
CONN_POOL_MIN_POOL_SIZE No 20 [0-10] Minimum number of physical connections per shard
CONN_POOL_MAX_POOL_SIZE No 60 [1-1600] Maximum number of physical connections per shard
CONN_POOL_MAX_WAIT_THREAD_COUNT No 0 [-1-8192] Max number of waiting threads for a connection per shard (DRUID)
CONN_POOL_IDLE_TIMEOUT No 30 [1-60] Timeout for idle physical connections
CONN_POOL_BLOCK_TIMEOUT No 5000 [1000-60000] Max wait time to obtain a connection from the pool
CONN_POOL_XPROTO_MAX_POOLED_SESSION_PER_INST No 512 [1-8192] Maximum number of cached sessions per storage node (private protocol)
XPROTO_MAX_DN_CONCURRENT No 500 [1-8192] Maximum number of concurrent requests per storage node (private protocol)
XPROTO_MAX_DN_WAIT_CONNECTION No 32 [1-8192] Maximum number of waiting requests per storage node (private protocol)
MERGE_SORT_BUFFER_SIZE No 2048 [1024-81920] Cache size for merge sorting at the TableScan layer, default is 2Mb
WORKLOAD_TYPE No [AP\ TP] Designated workload type for queries, usually auto-detected based on cost
EXECUTOR_MODE No [MPP\ TP_LOCAL\ AP_LOCAL] Specifies the execution mode for queries, typically determined by the workload by default
ENABLE_MASTER_MPP No FALSE [TRUE\ FALSE] Whether MPP capabilities are enabled on the primary instance
LOOKUP_JOIN_BLOCK_SIZE_PER_SHARD Yes 50 [1-100000] Number of IN values per shard for BKAJOIN execution when pruning is not dynamic
ENABLE_RUNTIME_FILTER No TRUE [TRUE\ FALSE] Switch to enable or disable Runtime Filter
FEEDBACK_WORKLOAD_AP_THRESHOLD No FALSE [TRUE\ FALSE] Switch for HTAP FEEDBACK specific to AP queries
FEEDBACK_WORKLOAD_TP_THRESHOLD No FALSE [TRUE\ FALSE] Switch for HTAP FEEDBACK specific to TP queries
MASTER_READ_WEIGHT No -1 [0-100] Weight for read-write separation based on predefined rules
SHOW_ALL_PARAMS No FALSE [TRUE\ FALSE] Whether to display all variables with SHOW command
ENABLE_SET_GLOBAL No FALSE [TRUE\ FALSE] Switch to enable the SET GLOBAL statement
FORCE_READ_OUTSIDE_TX No FALSE [TRUE\ FALSE] Whether to force multiple connections on a single shard within a transaction
ENABLE_COROUTINE Yes FALSE [TRUE\ FALSE] Switch to enable or disable wisp coroutines
TRUNCATE_TABLE_WITH_GSI No FALSE [TRUE\ FALSE] Whether truncation of tables with Global Secondary Index (GSI) is allowed
DDL_ON_GSI No FALSE [TRUE\ FALSE] Whether DDL operations directly on GSI tables are allowed
DML_ON_GSI No FALSE [TRUE\ FALSE] Whether DML operations directly on GSI tables are allowed
ENABLE_HASH_JOIN No TRUE [TRUE\ FALSE] Whether to allow the creation of HashJoin nodes during query plan optimization
ENABLE_BKA_JOIN No TRUE [TRUE\ FALSE] Whether BKAJoin nodes can be generated during query plan optimization
ENABLE_NL_JOIN No TRUE [TRUE\ FALSE] Whether NLJoin nodes can be generated during query plan optimization
ENABLE_SEMI_NL_JOIN No TRUE [TRUE\ FALSE] Whether SemiJoin can be implemented as NLJoin during query plan optimization
ENABLE_SEMI_HASH_JOIN No TRUE [TRUE\ FALSE] Whether SemiJoin can be implemented as HashJoin during query plan optimization
ENABLE_SEMI_BKA_JOIN No TRUE [TRUE\ FALSE] Whether SemiJoin can be implemented as BKAJoin during query plan optimization
ENABLE_SEMI_SORT_MERGE_JOIN No TRUE [TRUE\ FALSE] Whether SemiJoin can be implemented as MergeJoin during query plan optimization
ENABLE_MATERIALIZED_SEMI_JOIN No TRUE [TRUE\ FALSE] Whether SemiJoin can be implemented as MaterializedJoin during query plan optimization
ENABLE_SEMI_JOIN_REORDER No TRUE [TRUE\ FALSE] Whether SemiJoin can participate in CBO Reorder optimization during query plan optimization
ENABLE_HASH_AGG No TRUE [TRUE\ FALSE] Whether HashAgg nodes can be generated during query plan optimization
ENABLE_PARTIAL_AGG No TRUE [TRUE\ FALSE] Whether to allow Aggregation to be broken down into stages during query plan optimization
ENABLE_SORT_AGG No TRUE [TRUE\ FALSE] Whether SortAgg nodes can be generated during query plan optimization
ENABLE_PUSH_PROJECT No TRUE [TRUE\ FALSE] Whether to allow Project PushDown during query plan optimization
ENABLE_PUSH_JOIN No TRUE [TRUE\ FALSE] Whether to allow Join PushDown during query plan optimization
ENABLE_PUSH_AGG No TRUE [TRUE\ FALSE] Whether to allow Aggregate PushDown during query plan optimization
ENABLE_CBO_PUSH_AGG No TRUE [TRUE\ FALSE] Whether to allow Aggregate to be pushed through Joins during query plan optimization
ENABLE_PUSH_SORT No TRUE [TRUE\ FALSE] Whether to allow Sort PushDown during query plan optimization
ENABLE_STATISTIC_FEEDBACK No TRUE [TRUE\ FALSE] Whether to support feedback-based corrections to statistical information
ENABLE_CBO_PUSH_JOIN No TRUE [TRUE\ FALSE] Whether to allow optimization that pushes Joins through during the query planning stage
ENABLE_SORT_JOIN_TRANSPOSE No TRUE [TRUE\ FALSE] Whether to allow Sort to be pushed through Joins during query plan optimization
CHUNK_SIZE No 1024 [1-10240] Sets the batch size for computation by the executor
ENABLE_SORT_MERGE_JOIN No TRUE [TRUE\ FALSE] Whether to permit the generation of MergeJoin nodes during query plan optimization
ENABLE_BKA_PRUNING No TRUE [TRUE\ FALSE] Whether BKA Join pruning is activated
ENABLE_SPM No TRUE [TRUE\ FALSE] Whether execution plan management is enabled
ENABLE_EXPRESSION_VECTORIZATION No TRUE [TRUE\ FALSE] Whether to enable vectorized computation of expressions
FORCE_DDL_ON_LEGACY_ENGINE No TRUE [TRUE\ FALSE] Whether to enforce the use of the new DDL engine
PURE_ASYNC_DDL_MODE No TRUE [TRUE\ FALSE] Whether to execute DDL tasks in a non-blocking manner, with default settings causing the client to return immediately after executing a DDL, and the execution status can be checked with a SHOW [full] DDL command
DDL_JOB_REQUEST_TIMEOUT No 90000 [1-9223372036854775807] Sets the maximum timeout for DDL execution, defaulting to 25 days
LOGICAL_DDL_PARALLELISM No 1 [1-10240] Configures the concurrency for logical DDL execution, with a setting of 1 meaning that DDL tasks are executed serially
ENABLE_BROADCAST_RANDOM_READ No TRUE [TRUE\ FALSE] Whether to optimize random reads for broadcast tables

results matching ""

    No results matching ""