search
HomeDatabaseOraclewhat is oracle sga

what is oracle sga

Apr 18, 2022 am 11:54 AM
oracle

sga refers to the "system global area", which is a set of shared buffer storage areas allocated by ORACLE to the instance. It is used to store database data and control information to achieve the management and operation of database data. SGA is mainly composed of shared pool, data buffer, and redo log buffer; the data buffer is used to store the data recently read and written from the data file.

what is oracle sga

The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.

The memory structure is one of the most important components of the Oracle database. Operations in the database more or less rely on memory, which is an important factor affecting database performance. Oracle database includes 3 basic memory structures. :

what is oracle sga

Let me introduce you to some sga in the memory structure.

Introduction to oracle sga

The full name of sga is "System Global Area", which means "system global area" in Chinese and is allocated by ORACLE to the instance. A set of shared buffer storage areas, mainly used to store database data and control information. This information is shared by the database process (PGA cannot be shared) to realize the management and operation of database data.

It contains the data and control information of the Oracle server. It is allocated in the actual memory of the computer where the Oracle server resides. If the actual memory is not enough, it is written to the virtual memory.

SGA is a set of shared memory structures shared by all services and background processes. When a database instance starts, system global area memory is automatically allocated. When the database instance is shut down, SGA memory is reclaimed. SGA is the area that occupies the largest amount of memory and is also an important factor affecting database performance.

Query the SGA area:

SQL> show SGA

Total System Global Area 3290345472 bytes
Fixed Size            2217832 bytes
Variable Size         1795164312 bytes
Database Buffers     1476395008 bytes
Redo Buffers           16568320 bytes
SQL> select * from v$sga;

NAME              VALUE
-------------------- ----------
Fixed Size        2217832
Variable Size         1795164312
Database Buffers     1476395008
Redo Buffers           16568320
  • Fixed Size represents a fixed area that stores information about each component of SGA. The size cannot be modified.

  • Variable Size represents variable areas, such as shared pools, java pools, large pools, etc.

  • Database Buffers represents the database high-speed buffer.

  • Redo Buffers represents the log buffer.

SGA mainly includes:

The system global domain SGA is mainly composed of three parts: shared pool and data buffer , log buffer.

1. Shared pool (shared pool) : Used to store recently executed SQL statements and recently used data dictionary data.

It is mainly composed of two memory structures: Library cache and Data dictionary cache

Modify the size of the shared pool: ALTER SYSTEM SET SHARED_POOL_SIZE = 64M;

Library Cache cache is Information related to the executed SQL and PL/SQL, that is, the text of the SQL statement, the analyzed code and the execution plan. Realize the sharing of commonly used statements and use the LRU algorithm for management. It consists of the following two structures: Shared SQL area and Shared PL/SQL area;

Data Dictionary Cache caches the used database definition, which stores related tables, Column and other object definitions and permissions. It includes information about database files, tables, indexes, columns, users, permissions, and other database objects. During the syntax analysis phase, Server Process accesses information in the data dictionary to parse object names and verify access operations. Data dictionary information is cached in memory to help improve response times.

2. Data buffer (database buffer cache): Used to store data recently read and written from data files.

The data blocks used by the Oracle system (that is, the user's high-speed buffer) are stored in the data high-speed buffer. When data is written to the database, it is read and written in units of data blocks. When the data When the high-speed buffer is full, the system automatically removes some data that is not frequently accessed by users. If the data the user wants to check is not in the data cache, Oracle automatically reads it from the disk. The data high-speed buffer includes three types of areas:

1) Dirty data area (Dirty Buffers): Contains data blocks that have been changed and need to be written back to the data file.

2) Free Buffers: An area that does not contain any data and can be rewritten. Oracle can read data blocks from the data file in this area.

3) Reserved area (Pinned Buffers): This area contains areas that are being processed or are explicitly reserved for future use.

3. Redo log buffer (redo log buffer): Used to record the operations of the service or background process on the database.

Mainly used to restore each modification record is called a redo entry. Modifications can be redone using the information in the Redo entry.

In addition, there are two optional memory structures in SGA:

4. Java Pool: Used to store Java code.

5. Large Pool: Used to store large memory structures that are not directly related to SQL. Backup and restore use.

Recommended tutorial: "Oracle Tutorial"

The above is the detailed content of what is oracle sga. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL and Oracle: Key Differences in Features and FunctionalityMySQL and Oracle: Key Differences in Features and FunctionalityApr 18, 2025 am 12:15 AM

MySQL and Oracle each have advantages in performance, scalability, and security. 1) Performance: MySQL is suitable for read operations and high concurrency, and Oracle is good at complex queries and big data processing. 2) Scalability: MySQL extends through master-slave replication and sharding, and Oracle uses RAC to provide high availability and load balancing. 3) Security: MySQL provides fine-grained permission control, while Oracle has more comprehensive security functions and automation tools.

Oracle: The Powerhouse of Database ManagementOracle: The Powerhouse of Database ManagementApr 17, 2025 am 12:14 AM

Oracle is called the "Powerhouse" of database management because of its high performance, reliability and security. 1. Oracle is a relational database management system that supports multiple operating systems. 2. It provides a powerful data management platform with scalability, security and high availability. 3. Oracle's working principles include data storage, query processing and transaction management, and supports performance optimization technologies such as indexing, partitioning and caching. 4. Examples of usage include creating tables, inserting data, and writing stored procedures. 5. Performance optimization strategies include index optimization, partition table, cache management and query optimization.

What Does Oracle Offer? Products and Services ExplainedWhat Does Oracle Offer? Products and Services ExplainedApr 16, 2025 am 12:03 AM

Oracleoffersacomprehensivesuiteofproductsandservicesincludingdatabasemanagement,cloudcomputing,enterprisesoftware,andhardwaresolutions.1)OracleDatabasesupportsvariousdatamodelswithefficientmanagementfeatures.2)OracleCloudInfrastructure(OCI)providesro

Oracle Software: From Databases to the CloudOracle Software: From Databases to the CloudApr 15, 2025 am 12:09 AM

The development history of Oracle software from database to cloud computing includes: 1. Originated in 1977, it initially focused on relational database management system (RDBMS), and quickly became the first choice for enterprise-level applications; 2. Expand to middleware, development tools and ERP systems to form a complete set of enterprise solutions; 3. Oracle database supports SQL, providing high performance and scalability, suitable for small to large enterprise systems; 4. The rise of cloud computing services further expands Oracle's product line to meet all aspects of enterprise IT needs.

MySQL vs. Oracle: The Pros and ConsMySQL vs. Oracle: The Pros and ConsApr 14, 2025 am 12:01 AM

MySQL and Oracle selection should be based on cost, performance, complexity and functional requirements: 1. MySQL is suitable for projects with limited budgets, is simple to install, and is suitable for small to medium-sized applications. 2. Oracle is suitable for large enterprises and performs excellently in handling large-scale data and high concurrent requests, but is costly and complex in configuration.

Oracle's Purpose: Business Solutions and Data ManagementOracle's Purpose: Business Solutions and Data ManagementApr 13, 2025 am 12:02 AM

Oracle helps businesses achieve digital transformation and data management through its products and services. 1) Oracle provides a comprehensive product portfolio, including database management systems, ERP and CRM systems, helping enterprises automate and optimize business processes. 2) Oracle's ERP systems such as E-BusinessSuite and FusionApplications realize end-to-end business process automation, improve efficiency and reduce costs, but have high implementation and maintenance costs. 3) OracleDatabase provides high concurrency and high availability data processing, but has high licensing costs. 4) Performance optimization and best practices include the rational use of indexing and partitioning technology, regular database maintenance and compliance with coding specifications.

How to delete oracle library failureHow to delete oracle library failureApr 12, 2025 am 06:21 AM

Steps to delete the failed database after Oracle failed to build a library: Use sys username to connect to the target instance. Use DROP DATABASE to delete the database. Query v$database to confirm that the database has been deleted.

How to create cursors in oracle loopHow to create cursors in oracle loopApr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor