Overview
ob_sql_work_area_percentage specifies the percentage of memory in the entire tenant that is allocated to the SQL workspace.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Modify variables
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | 5 |
| Value range | [0, 100] |
| Effective Scope | Global |
| Modifiable | Yes, you can use theSETStatement modification. |
Usage instructions
Work area 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, Work area memory = Tenant memory * ob_sql_work_area_percentage (default 5%).
If the request concurrency is high and each request occupies a large amount of workspace memory, an insufficient workspace memory error may occur. This often happens in scenarios involving union, sort, or group by. To avoid this issue, you can appropriately increase system variables. For example:
obclient> SET GLOBAL ob_sql_work_area_percentage = 10;