Sunday, April 27, 2008

System Global Area

The SGA consists of several memory structures:
1. Shared Pool
2. Database Buffer Cache
3. Redo Log Buffer
4. Other structures (for example, lock and latch management, statistical data)


Shared Pool
It consists of two key performance-related memory structures, Library Cache, Data Dictionary Cache. Because the Shared Pool can be shared globally, such as reusable SQL execution plans, PL/SQL packages, procedures, functions, and cursor information, it must be sized to accommodate the needs of both the fixed and variables areas. Memory allocation for the Shared Pool is determined by the SHARED_POOL_SIZE initialization parameter. It can be dynamically resized using ALTER SYSTEM SET. After performance analysis, this can be adjusted but the total SGA size cannot exceed SGA_MAX_SIZE.

Libray Cache
It stores information about eh most recently used SQL and PL/SQL statements. It enables the sharing of commonly used statements which is managed by the least recently used (LRU) algorithm.

Data Dictionary Cache
This is a collection of the most recently used definitions in the database, which includes information about database files, tables, indexes, columns, users, privileges, and other database objects. During the parse phase, the server process looks at the data dictionary for information to resolve object names and validate access. By caching data dctionary information into memory improves response time on queries and DML.

There are two additional memory structures that can be configured within the SGA:
1. Large Pool
2. Java Pool

No comments: