Sunteți pe pagina 1din 6

Text description of the illustration cncpt151.

gif
 Statistics on allocation and use of work area memory can be viewed in the following dynamic views:

V$SYSSTAT
V$SESSTAT
V$PGASTAT
V$SQL_WORKAREA
V$SQL_WORKAREA_ACTIVE

 The following three columns in the V$PROCESS view report the PGA memory allocated and used by an Oracle process:

PGA_USED_MEM
PGA_ALLOCATED_MEM
PGA_MAX_MEM
The Shared Pool

The shared pool portion of the SGA contains three major areas: library cache, dictionary cache, and control structures. Figure 7-1
shows the contents of the shared pool.

The total size of the shared pool is determined by the initialization parameter SHARED_POOL_SIZE. The default value of this
parameter is 3,500,000 bytes. Increasing the value of this parameter increases the amount of memory reserved for the shared pool, and
therefore increases the space reserved for shared SQL areas.

Figure 7-1 Contents of the Shared Pool


The size of the SGA is determined by several initialization parameters. The parameters that most affect SGA size are:

DB_BLOCK_SIZE The size, in bytes, of a single data block and database buffer.
DB_BLOCK_BUFFERS The number of database buffers, each the size of DB_BLOCK_SIZE, allocated for the SGA.
The total amount of space allocated for the database buffer cache in the SGA is DB_BLOCK_SIZE times
DB_BLOCK_BUFFERS.
LOG_BUFFER The number of bytes allocated for the redo log buffer.
SHARED_POOL_SIZE The size in bytes of the area devoted to shared SQL and PL/SQL statements.
Data Blocks, Extents, and Segments

ORACLE allocates database space for all data in a database. The units of logical database allocations are data blocks, extents, and
segments. Figure 3 illustrates the relationships between these data structures.

Data Blocks
At the finest level of granularity, an ORACLE database's data is stored in data blocks (also called logical blocks, ORACLE
blocks, or pages). An ORACLE database uses and allocates free database space in ORACLE data blocks. Figure 4 illustrates a
typical ORACLE data block.

Extents
The next level of logical database space is called an extent. An extent is a specific number of contiguous data blocks that are
allocated for storing a specific type of information.

Segments
The level of logical database storage above an extent is called a segment. A segment is a set of extents which have been
allocated for a specific type of data structure, and all are stored in the same tablespace. For example, each table's data is stored
in its own data segment, while each index's data is stored in its own index segment. ORACLE allocates space for segments in
extents. Therefore, when the existing extents of a segment are full, ORACLE allocates another extent for that segment.
Because extents are allocated as needed, the extents of a segment may or may not be contiguous on disk, and may or may not
span files. An extent cannot span files, though.

S-ar putea să vă placă și