dataiotech Labs
dbaguidedbaguideDBAdataxtoolsdataopsphere
Home/Glossary/SGA / PGA
SGA / PGAMemory & Architecture

SGA vs. PGA Memory Architecture (Sistem vs. Süreç Belleği)

SGA is the system-wide shared memory pool (Buffer Cache, Shared Pool), while PGA is private dedicated memory allocated to individual server processes for sorting and hash joins.

Internal Architecture Breakdown

The System Global Area (SGA) is shared memory holding database cache buffers, redo log buffers, and the shared pool (library and dictionary cache).

The Program Global Area (PGA) is allocated exclusively to each Oracle server process, handling work areas for sorting, hash joins, and session state. Undersized PGA spills work units to TEMP tablespaces, degrading query latency.

Production Inspection Queries

Oracle
SELECT name, bytes/1024/1024 AS size_mb FROM v$sgainfo WHERE name IN ('Buffer Cache Size', 'Shared Pool Size', 'Redo Buffers');
SELECT name, value/1024/1024 AS size_mb FROM v$pgastat WHERE name IN ('total PGA allocated', 'maximum PGA allocated');