Memory Architecture   «Prev  Next»

Lesson 10 Contents of the Program Global Areas
Objective Name the contents of the PGA.

Oracle PGA Contents

The two components of PGA

When you execute an SQL statement, the source and the execution plan are stored in shared memory because all processes can use that information. Information that is process specific, such as bind variable information and PL/SQL variable values, is contained in the PGA. Under the standard configuration of Oracle, the Program Global Area contains the following two types of information:
  1. Stack space
  2. Session information

Stack Space

The stack space is used to hold process variables, arrays, and other similar information.

Session information

Session information includes PL/SQL variables and the private SQL areas. Under the multi-threaded server configuration, the session information is contained in the SGA.

Overview of the Program Global Area (PGA)

The PGA is memory specific to an operating process or thread that is not shared by other processes or threads on the system. Because the PGA is process-specific, it is never allocated in the SGA. The PGA is a memory heap that contains session-dependent variables required by a dedicated or shared server process. The server process allocates memory structures that it requires in the PGA. An analogy for a PGA is a temporary countertop workspace used by a file clerk. In this analogy, the file clerk is the server process doing work on behalf of the customer (client process). The clerk clears a section of the countertop, uses the workspace to store details about the customer request and to sort the folders requested by the customer, and then gives up the space when the work is done. Figure 5-10 shows an instance PGA (collection of all PGAs) for an instance that is not configured for shared servers. You can use an initialization parameter to set a target maximum size of the instance PGA. Individual PGAs can grow as needed up to this target size.

Instance PGA

Figure 5-10 Instance PGA
Figure 5-10 Instance PGA

Oracle PGA - Quiz

Click the Quiz link below to test your knowledge of the PGA.
Oracle PGA - Quiz