The system global area (SGA) is the memory area that contains data and control information for one Oracle Database instance. All server and background processes share the SGA. When you start a database instance, the amount of memory allocated for the SGA is displayed. The SGA includes the following data structures:
- The shared pool caches various constructs that multiple users can share; for example, the shared pool stores parsed SQL, PL/SQL code, system parameters, and data dictionary information. Almost every operation that occurs in the database involves the shared pool. For example, if a user runs a SQL statement, then Oracle Database accesses the shared pool.
- (Optional) To allow vector index creation and maintenance, you must enable a memory area stored in the SGA called the vector pool . The vector pool is a memory allocated in SGA to store Hierarchical Navigable Small World (HNSW) vector indexes and all associated metadata. It is also used to speed up inverted file flat (IVF) index creation, as well as data manipulation language (DML) operations on base tables with IVF indexes.
- (Optional) The flashback buffer works with Flashback Database so you can rewind data back in time to correct any problems. When Flashback Database is enabled, the Recovery Writer process (RVWR) starts. RVWR periodically copies modified blocks from the buffer cache to the flashback buffer, and it sequentially writes Flashback Database data from the flashback buffer to the Flashback Database logs, which are circularly reused.
- The database buffer cache is the memory area that stores copies of data blocks that are read from data files. A buffer is a main memory address in which the buffer manager temporarily caches a currently or recently used data block. All users who are concurrently connected to a database instance share access to the buffer cache.
- (Optional) True Cache is an in-memory, consistent, and automatically managed SQL and key-value (object or JSON) cache for Oracle Database. You can keep frequently accessed tables persistent in the database buffer cache for True Cache or the primary database (or both).
- (Optional) The Database Smart Flash Cache is a memory extension of the database buffer cache for databases that are running on Solaris or Oracle Linux. It provides a level 2 cache for database blocks. It can improve response time and overall throughput for both read-intensive online transaction processing (OLTP) workloads and ad-hoc queries and bulk data modifications in a data warehouse (DW) environment. Database Smart Flash Cache resides on one or more flash disk devices, which are solid state storage devices that use flash memory. Database Smart Flash Cache is typically more economical than additional main memory, and it is an order of magnitude faster than disk drives.
- The redo log buffer is a circular buffer in the SGA that holds information about changes to the database. This information is stored in redo entries. Redo entries contain the information that is necessary to reconstruct (or redo) changes to the database by DML, data definition language (DDL), or internal operations. Redo entries are used for database recovery if necessary.
- (Optional) The large pool is for memory allocations that are larger than is appropriate for the shared pool. The large pool can provide large memory allocations for the user global area (UGA) for the shared server and the Oracle XA interface (which is used where transactions interact with multiple databases), message buffers that are used in the parallel processing of statements, buffers for Recovery Manager (RMAN) I/O workers, and deferred inserts.
- (Optional) The In-Memory Area enables objects (tables, partitions, and other types) to be stored in memory in the columnar format. This format enables scans, joins, and aggregates to perform much faster than the traditional on-disk format, thus providing fast reporting and DML performance for both OLTP and DW environments. This feature is particularly useful for analytic applications that operate on a few columns that return many rows rather than for OLTP, which operates on a few rows that return many columns.
- (Optional) The memoptimize pool provides high performance and scalability for key-based queries. The memoptimize pool contains two parts: the memoptimize buffer area and the hash index. Fast lookup uses the hash index structure in the memoptimize pool to provide fast access to the blocks of a given table (enabled for
MEMOPTIMIZE FOR READ
) that are permanently pinned in the buffer cache to avoid disk I/O. The buffers in the memoptimize pool are completely separate from the database buffer cache. The hash index is created when the Memoptimized Rowstore is configured, and Oracle Database maintains it automatically. - (Optional) The shared I/O pool (SecureFiles) is for large I/O operations on SecureFile Large Objects (LOBs). LOBs are a set of data types that hold large amounts of data. SecureFile is an LOB storage parameter that allows deduplication, encryption, and compression.
- (Optional) The streams pool works with Oracle Data Pump and Oracle GoldenGate processes. The streams pool stores buffered queue messages. Unless you specifically configure it, the size of the streams pool starts at zero.
- (Optional) The Java pool is for all session-specific Java code and data in the Java Virtual Machine (JVM). Java pool memory is used in different ways, depending on the mode in which Oracle Database is running.
- The fixed SGA is an internal housekeeping area that contains general information about the state of the database and database instance and information that is communicated between processes.