
The basic memory structures associated with an Oracle instance include:
- System Global Area (SGA): Shared by all server and background process.
- Program Global Area (PGA): Private to each server and background process; there is one PGA for each process.
The System Global Area (SGA) is a shared memory area that contains data and control information for the instance.
The SGA includes the following data structures:
- Database buffer cache: Caches block of data retrieved from database
- Redo log buffer: Caches redo information (used for instance recovery) until it can be written to the physical redo log files store on disk
- Shared pool: Caches various constructs that can be shared among users
- Large pool: Optional area used for buffering large I/O request
- Java pool: Used for all session-specific Java code and data within the Java Virtual Machine (JVM)
- Stream pool: Used by Oracle Streams
With the dynamic SGA infrastructure, the size of the database buffer cache, the shared pool, the large pool, the Java pool, and the Stream pool changes without shutting down the instance.
The preconfigured database has been pretuned with adequate setting for the memory parameters. However, as your database usage expands your may find it necessary to alter the setting of the memory parameters.
Oracle provides alerts and advisors to identify memory sizing problems and to help you determine appropriate values for memory parameters.
A Program Global Area (PGA) is a memory region which contains data and control information for each server process. A server process is a process that services a client’s request. Each server process has it own private PGA area that is created when the server process is started. Access to it is exclusive to that server process, and is read and written only by Oracle code acting on behalf of it.
The amount of PGA memory used and its content depends on weather the instance is configured in shared server mode. Generally, the PGA contains the following:
- Private SQL area: Contains data such as bind information and run-time memory structures. Each session that issues a SQL statement has a private SQL area.
- Session memory: Memory allocated ti hold session variables and other information related to the session.