Oracle 11gR1
V$SQL_WORKAREA
displays information about work areas used by SQL cursors. Each SQL statement stored in the shared pool has one or more child cursors that are listed in the V$SQL
view. V$SQL_WORKAREA
lists all work areas needed by these child cursors; V$SQL_WORKAREA
can be joined with V$SQLAREA
on (ADDRESS
, HASH_VALUE
) and with V$SQL
on (ADDRESS
, HASH_VALUE
, CHILD_NUMBER
).
You can use this view to find out answers to the following questions:
· What are the top 10 work areas that require the most cache area?
· For work areas allocated in AUTO
mode, what percentage of work areas are running using maximum memory?
Column | Datatype | Description |
|
| Address of the parent cursor handle |
|
| Hash value of the parent statement in the library cache. Two columns |
|
| SQL identifier of the parent statement in the library cache |
|
| Number of the child cursor that uses this work area. The columns |
|
| Address of the work area handle. This is the primary key for the view. |
|
| Type of operation using the work area ( |
|
| A unique number used to identify the operation in the execution plan. This identifier can be joined to |
|
| Sizing policy for this work area ( |
|
| Estimated size (in bytes) required by this work area to execute the operation completely in memory (optimal execution). Derived from either optimizer statistics or previous executions. |
|
| Estimated size (in bytes) required by this work area to execute the operation in a single pass. Derived from either optimizer statistics or previous executions. |
|
| Memory (in bytes) used by this work area during the last execution of the cursor |
|
| Indicates whether this work area runs using |
|
| Degree of parallelism used during the last execution of this operation |
|
| Number of times this work area was active |
|
| Number of times this work area ran in optimal mode |
|
| Number of times this work area ran in one-pass mode |
|
| Number of times this work area ran below the one-pass memory requirement |
|
| Average time this work area is active (in hundredths of a second) |
|
| Maximum temporary segment size (in bytes) created by an instantiation of this work area. This column is NULL if this work area has never spilled to disk. |
|
| Temporary segment size (in bytes) created in the last instantiation of this work area. This column is NULL if the last instantiation of this work area did not spill to disk. |
Note:
1.
SELECT hash_value, sql_id, operation_type, policy, estimated_optimal_size, total_executions
FROM V$SQL_WORKAREA;
HASH_VALUE | SQL_ID | OPERATION_TYPE | POLICY | ESTIMATED_OPTIMAL_SIZE | TOTAL_EXECUTIONS |
561512464 | 8c4yc5whrh00h | GROUP BY (SORT) | AUTO | 36864 | 308 |
3581149450 | 9f61byrar808a | SORT (v2) | AUTO | 2048 | 392 |
3971875106 | 6s6qhf7qbw092 | HASH-JOIN | AUTO | 831488 | 3 |
2351695638 | 0dw4ur262s1sq | BUFFER | AUTO | 55296 | 7 |
275908960 | 6x2hwbs8742b0 | IDX MAINTENANCE (SOR | AUTO | 1024 | 2 |
3547466279 | 9636a7g9r42j7 | CONNECT-BY (SORT) | AUTO | 73728 | 0 |
No comments:
Post a Comment