Note
This view is available starting with V2.2.77.
Purpose
This view displays some overall information about the SQL Workarea on all OBServer nodes, including the maximum available memory, current used memory, and current held memory. You can use this view to understand the usage of the Workarea in the current tenant, such as memory utilization.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| MAX_WORKAREA_SIZE | NUMBER(38) | NO | The maximum Workarea memory, determined by the parameter, in bytes. |
| WORKAREA_HOLD_SIZE | NUMBER(38) | NO | The current held memory size of the Workarea, in bytes.
Note>The actual usage cannot be obtained from the memory management module, so only the held value can be obtained. |
| MAX_AUTO_WORKAREA_SIZE | NUMBER(38) | NO | The estimated maximum available memory size when auto is enabled, in bytes. You can consider it as calculated by the formula max_work_area_size - hold + total_mem_used, representing the maximum memory size managed by auto under the current Workarea conditions. |
| MEM_TARGET | NUMBER(38) | NO | The target size of the available memory for the current Workarea, in bytes. The difference from max_auto_work_area is that this value is a certain proportion of max_auto_work_area. |
| TOTAL_MEM_USED | NUMBER(38) | NO | The current size of auto memory used, in bytes. This value is statistics collected by the SQL automatic memory management module and does not represent the actual usage size. |
| GLOBAL_MEM_BOUND | NUMBER(38) | NO | The maximum available memory size in auto mode, in bytes. |
| DRIFT_SIZE | NUMBER(38) | NO | The change in memory demand, in bytes. It is mainly used to track fluctuations. When the fluctuation reaches a certain range, it automatically triggers a recalculation of the global bound size. |
| WORKAREA_COUNT | NUMBER(38) | NO | The number of registered operator profiles. |
| MANUAL_CALC_COUNT | NUMBER(38) | NO | The number of times the global bound size was calculated manually. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the server. |
| SVR_PORT | NUMBER | NO | The port number of the server. |
Sample query
Query the SQL Workarea information for the current tenant on all OBServer nodes.
obclient [SYS]> SELECT * FROM SYS.GV$OB_SQL_WORKAREA_MEMORY_INFO;
The query result is as follows:
+-------------------+--------------------+------------------------+------------+----------------+------------------+------------+----------------+-------------------+----------------+----------+
| MAX_WORKAREA_SIZE | WORKAREA_HOLD_SIZE | MAX_AUTO_WORKAREA_SIZE | MEM_TARGET | TOTAL_MEM_USED | GLOBAL_MEM_BOUND | DRIFT_SIZE | WORKAREA_COUNT | MANUAL_CALC_COUNT | SVR_IP | SVR_PORT |
+-------------------+--------------------+------------------------+------------+----------------+------------------+------------+----------------+-------------------+----------------+----------+
| 214748364 | 0 | 214748364 | 214748364 | 0 | 26843545 | 0 | 0 | 887 | 11.xxx.xxx.xxx | 28825 |
+-------------------+--------------------+------------------------+------------+----------------+------------------+------------+----------------+-------------------+----------------+----------+
1 row in set
