Note
This variable is introduced since 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] |
| Applicable scope | Global |
| Modifiable | Yes. It can be modified using the SET statement. |
Considerations
The workspace memory refers to the memory used by blocking operators such as SQL sorting. It is controlled by the tenant system variable ob_sql_work_area_percentage, with a default value of 5%. That is, workspace memory = tenant memory * ob_sql_work_area_percentage (default 5%).
If there is a high level of concurrent requests and each request consumes a significant amount of workspace memory, it may result in errors due to insufficient workspace memory. This often occurs in scenarios involving union, sort, group by, and so on. If such problems arise, they can be mitigated by increasing the value of the system variable. Here is an example:
obclient> SET GLOBAL ob_sql_work_area_percentage = 10;