parallel_min_scan_time_threshold

2025-11-14 07:33:33  Updated

Note

This variable was introduced in V4.2.0.

Description

parallel_min_scan_time_threshold is a variable used in the auto DOP strategy to calculate the parallelism, which is the minimum evaluation execution time for scanning base tables. When the evaluation execution time for scanning base tables exceeds this value, parallelism is enabled, and the value is used to calculate an appropriate parallelism.

Privilege requirements

  • Query variables

    • Global level

      In the sys tenant and user tenants, you can execute the SHOW VARIABLES statement or view SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE (Oracle mode) or information_schema.GLOBAL_VARIABLES (MySQL mode) to query the value of a global system variable.

    • Session level

      In the sys tenant and user tenants, you can execute the SHOW VARIABLES statement or view SYS.TENANT_VIRTUAL_SESSION_VARIABLE (Oracle mode) or information_schema.SESSION_VARIABLES (MySQL mode) to query the value of a session system variable.

  • Modify variables

    • Set the variable at the global level

      • The sys tenant can directly modify the value of a global system variable.

      • MySQL user tenants must have the SUPER or ALTER SYSTEM privilege to modify the value of a global system variable.

      • For V4.x, Oracle user tenants must have the ALTER SYSTEM privilege to modify the value of a global system variable starting from V4.2.0.

    • Set the variable at the session level

      The sys tenant and user tenants can directly modify the value of a session system variable in their respective tenants.

Attributes

Attribute Description
Type uint
Default value 1000
Value range [ 10, 9223372036854775807 ] ms
Scope
  • Global
  • Session
Modifiable Yes. You can modify it by using the SET statement.

Examples

set parallel_min_scan_time_threshold = 100;
set global parallel_min_scan_time_threshold = 100;

Contact Us