Note
This variable was introduced in OceanBase Database V2.1.
Description
ob_sql_work_area_percentage specifies the maximum percentage of tenant memory for SQL execution.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | 5 |
| Value range | [0, 100] |
| Effective scope | Global |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Considerations
The workspace memory is used by blocking operators such as SQL Sort, and is specified by the system variable ob_sql_work_area_percentage, with a default value of 5%. The maximum memory for a workspace is calculated by using the following formula: Tenant memory × ob_sql_work_area_percentage.
The error of insufficient workspace memory is often reported when a great number of concurrent requests are involved and each request occupies a large amount of workspace memory, for example, when the Union, Sort, or Group By operator is used. To resolve this issue, you can increase the value of the ob_sql_work_area_percentage variable. Here is an example:
obclient> SET GLOBAL ob_sql_work_area_percentage = 10;