Note
This variable was introduced in OceanBase Database V2.1.
Description
parallel_servers_target specifies the queue condition for parallel queries on each server.
When the number of threads taken by Parallel eXecution (PX) of multiple SQL queries exceeds the specified queue condition, subsequent SQL queries for PX must wait in a queue.
Attributes
| Attribute | Description |
|---|---|
| Type | Integer |
| Default value | 0, which has no special meaning. This value is automatically set when you create a tenant. |
| Value range | [0, 9223372036854775807] |
| Effective scope | Global |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Considerations
The parallel_servers_target variable takes effect at the tenant level. When you create a tenant, take note of the following considerations:
If you specify the value of the
parallel_servers_targetvariable in the statement, the system sets theparallel_servers_targetvariable for the tenant based on the specified value.You can use the following statement to specify the value of the
parallel_servers_targetvariable when you create a tenant:obclient> CREATE TENANT IF NOT EXISTS <tenant_name> CHARSET='utf8mb4', ZONE_LIST=('zone1'), PRIMARY_ZONE='zone1', RESOURCE_POOL_LIST=('<pool_name>') set parallel_servers_target = 624;If you do not specify the value of the
parallel_servers_targetvariable, the system automatically specifies a value based on the value ofmin_cpuwhen you create a tenant on an OBServer node.To view this value, log on to the tenant and execute the following statement:
obclient> show variables like 'parallel_servers_target';
Example
obclient> SET GLOBAL parallel_servers_target = 624;