Note
This variable is introduced since 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 | INT |
| Default value | 0, which has no special meaning. This value will be automatically set when you create a tenant. |
| Value range | [0, 9223372036854775807] |
| Applicable scope | Global |
| Modifiable | Yes. It can be modified using the SET statement. |
Considerations
The parallel_servers_target variable takes effect at the tenant level. When you create a tenant, note that:
If you specify the value of the
parallel_servers_targetvariable in the statement, the tenant sets theparallel_servers_targetvariable 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 ofmax_cpuwhen you create a tenant in an OBServer node.To view this value, log on to the tenant and execute the
show variables like 'parallel_servers_target'statement.obclient> show variables like 'parallel_servers_target';
Examples
obclient> SET GLOBAL parallel_servers_target = 624;