Note
This view is available starting with V2.2.77.
Purpose
This view displays statistics about all previous workarea executions, such as the number of times the workarea was processed entirely in memory between 1M and 2M, the number of one-pass executions, etc.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| LOW_OPTIMAL_SIZE | bigint(20) | NO | The minimum memory size for the workarea in optimal mode. |
| HIGH_OPTIMAL_SIZE | bigint(20) | NO | The maximum memory size for the workarea in optimal mode. |
| OPTIMAL_EXECUTIONS | bigint(20) | NO | The number of executions of the workarea in optimal mode within the minimum and maximum range. |
| ONEPASS_EXECUTIONS | bigint(20) | NO | The number of one-pass executions of the workarea within the minimum and maximum range. |
| MULTIPASSES_EXECUTIONS | bigint(20) | NO | The number of multi-pass executions of the workarea within the minimum and maximum range. |
| TOTAL_EXECUTIONS | bigint(20) | NO | The total number of executions of the workarea. |
| CON_ID | bigint(20) | NO | The tenant ID. |
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
Sample query
Query the statistics about all previous workarea executions of the tenant with ID 1002 on the current node, and display the first 10 records.
obclient[oceanbase]> SELECT * FROM oceanbase.V$SQL_WORKAREA_HISTOGRAM WHERE CON_ID=1002 LIMIT 10;
The query result is as follows:
+------------------+-------------------+--------------------+--------------------+------------------------+------------------+--------+----------------+----------+
| LOW_OPTIMAL_SIZE | HIGH_OPTIMAL_SIZE | OPTIMAL_EXECUTIONS | ONEPASS_EXECUTIONS | MULTIPASSES_EXECUTIONS | TOTAL_EXECUTIONS | CON_ID | SVR_IP | SVR_PORT |
+------------------+-------------------+--------------------+--------------------+------------------------+------------------+--------+----------------+----------+
| 0 | 1048576 | 12008 | 0 | 0 | 12008 | 1002 | 172.xx.xxx.xxx | 2882 |
| 1048576 | 2097152 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
| 2097152 | 3145728 | 11 | 0 | 0 | 11 | 1002 | 172.xx.xxx.xxx | 2882 |
| 3145728 | 4194304 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
| 4194304 | 5242880 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
| 5242880 | 6291456 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
| 6291456 | 7340032 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
| 7340032 | 8388608 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
| 8388608 | 9437184 | 11 | 0 | 0 | 11 | 1002 | 172.xx.xxx.xxx | 2882 |
| 9437184 | 10485760 | 0 | 0 | 0 | 0 | 1002 | 172.xx.xxx.xxx | 2882 |
+------------------+-------------------+--------------------+--------------------+------------------------+------------------+--------+----------------+----------+
10 rows in set