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

本站中文解释

/V$SGASTAT:

Oracle视图是一种把多张表汇总成一张表,它把数据库中大量的各种数据以可识别的表格样式进行展示。

DBA_HIST_SGASTAT和V$SGASTAT是Oracle中查询有关文件静态池的视图,都用于反映文件的使用状况,用来监控系统参数SGA,其中要注意:

1. DBA_HIST_SGASTAT查询的是历史记录,查看历史记录可以更好地理解系统参数在经历过演变之后所处于的状态;

2. V$SGASTAT是实时记录,查看实时记录可以更直接地了解当前系统参数的情况;

使用这些视图查看SGA的使用状态,可以分析SGA的使用情况,从而实现对SGA的优化机制 。使用方法如下:

SELECT *FROM DBA_HIST_SGASTAT/V$SGASTAT;

例:
SELECT NAME,POOL,BYTES FROM V$SGASTAT WHERE POOL=’Java Pool’;

此语句用于查询Java Pool的名称、池及使用状态

官方英文解释

DBA_HIST_SGASTAT displays detailed historical information on the system global area (SGA).

This view contains snapshots of V$SGASTAT.

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

NAME

VARCHAR2(64)

SGA component group

POOL

VARCHAR2(30)

Designates the pool in which the memory in NAME resides:

  • in-memory pool – Memory is allocated from the In-Memory pool

  • java pool – Memory is allocated from the Java pool

  • large pool – Memory is allocated from the large pool

  • numa pool – Memory is allocated from the NUMA pool

  • shared pool – Memory is allocated from the shared pool

  • streams pool – Memory is allocated from the Streams pool

BYTES

NUMBER

Memory size (in bytes)

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$SGASTAT”


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