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

本站中文解释

V$SGASTAT视图用于显示SGA中每个组件的内存使用情况。它包含指定组件中每个元素的总量、已分配的量及可用的量等信息。可以用于自动监控,以及指导在增加、减少或者调整内存时对SGA大小进行优化。

使用V$SGASTAT视图的步骤如下:

1. 首先使用v$sgastat视图查询所有的内存组件
例如:
SELECT name, pool, bytes/1024/1024 MBFREE FROM v$sgastat;

2. 根据SGA中的memory components分析其当前的内存使用情况

3. 根据使用情况,调整SGA的1M大小及内存组件的设置,以便于更有效地使用SGA内存

注意:在使用该视图前,应先执行alter system flush shared_pool命令,以保证SGA中的各组件使用情况的准确性和一致性。

官方英文解释

V$SGASTAT displays detailed information on the system global area (SGA).

Column Datatype Description

POOL

VARCHAR2(14)

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

NAME

VARCHAR2(26)

SGA component name

BYTES

NUMBER

Memory size (in bytes)

CON_ID

NUMBER

The ID of the container to which the data pertains. 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


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