Oracle 视图 DBA_HIST_SQL_WORKAREA_HSTGRM 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_HIST_SQL_WORKAREA_HSTGRM是从8i开始就有的与SQL缓冲区池相关的视图,用于显示SQL缓冲池和SQL操作相关信息。它可以用来监控SQL缓冲区池的变化同时记录SQL工作区和SQL缓冲区池使用情况。

它提供了以下主要功能:

1. 查询SQL缓冲区池的缓存大小,了解不同的SQL所使用的缓存大小;
2. 使用者可以根据当前的SQL使用情况,来分析是否需要调整SQL缓冲池的大小;
3. 查询活跃的SQL缓冲区池的变化情况,以及缓存的效率和命中概率等;
4. 监控SQL响应时间,了解SQL执行情况,以便及时调整。

使用方法:

可以利用SQL命令来查询DBA_HIST_SQL_WORKAREA_HSTGRM视图,从而获取SQL缓冲区池的缓存大小,SQL操作的信息,以及SQL缓冲区池的使用情况等。

具体的SQL语句如下:

SELECT * FROMDBA_HIST_SQL_WORKAREA_HSTGRM;

官方英文解释

DBA_HIST_SQL_WORKAREA_HSTGRM displays the historical cumulative work area execution statistics (cumulated since instance startup) for different work area groups.

This view contains snapshots of V$SQL_WORKAREA_HISTOGRAM.

Column Datatype NULL Description

SNAP_ID

NUMBER

NOT NULL

Unique snapshot ID

DBID

NUMBER

NOT NULL

Database ID for the snapshot

INSTANCE_NUMBER

NUMBER

NOT NULL

Instance number for the snapshot

LOW_OPTIMAL_SIZE

NUMBER

NOT NULL

Lower bound for the optimal memory requirement of work areas included in the row (in bytes)

HIGH_OPTIMAL_SIZE

NUMBER

NOT NULL

Upper bound for the optimal memory requirement of work areas included in the row (in bytes)

OPTIMAL_EXECUTIONS

NUMBER

Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which have been executed in optimal mode since instance startup

ONEPASS_EXECUTIONS

NUMBER

Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which have been executed in one-pass mode since instance startup

MULTIPASSES_EXECUTIONS

NUMBER

Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which have been executed in multi-pass mode since instance startup

TOTAL_EXECUTIONS

NUMBER

Sum of OPTIMAL_EXECUTIONS, ONEPASS_EXECUTIONS, and MULTIPASSES_EXECUTIONS

CON_DBID

NUMBER

The database ID of the PDB for the sampled session

CON_ID

NUMBER

The ID of the container that CON_DBID identifies. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data

See Also:

“V$SQL_WORKAREA_HISTOGRAM”


数据运维技术 » Oracle 视图 DBA_HIST_SQL_WORKAREA_HSTGRM 官方解释,作用,如何使用详细说明