The program global area (PGA) is a nonshared memory region within the database instance that contains data and control information exclusively for use by a server or background process. Oracle Database creates server processes to handle connections to the database on behalf of client programs. (The diagram shows a PGA for a server process.)
In a dedicated server environment, Oracle Database creates one PGA for each server and background process that starts. Oracle Database deallocates a PGA when the associated server or background process is terminated. In a dedicated server session, the PGA consists of the following components:
- SQL work areas include the sort area for functions that order data, such as ORDER BY and GROUP BY, a hash area for performing hash joins of tables, and a bitmap merge area for merging data that is retrieved from scans of multiple bitmap indexes.
- The user global area (UGA) is a user session data storage area for session variables, such as logon information and other information that a database session requires, and the OLAP pool that manages OLAP data pages, which are equivalent to data blocks.
- The private SQL area holds information about a parsed SQL statement and other session-specific information for processing. When a server process runs SQL or PL/SQL code, the process uses the private SQL area to store bind variable values, query execution state information, and query execution work areas. Multiple private SQL areas in the same or different sessions can point to a single execution plan in the SGA. The persistent area contains bind variable values. The runtime area contains query execution state information. A cursor is a name or handle to a specific area in the private SQL area. You can think of a cursor as a pointer on the client side and as a state on the server side. Because cursors are closely associated with private SQL areas, the terms are sometimes used interchangeably.
In a shared server environment, multiple client users share the server process. The UGA moves into the large pool, leaving the PGA with only SQL work areas and the private SQL area.