Oracle学习笔记<<2>>
Oralce Architectural ComponentsMeroy Structure Oracle’s memory structure consists of two memory areas known as :
System Grobal Area(SGA):allocated at instance start up,and is fundamental component of an Oralce instance
Program Global Area(PGA):allocated where the server process is started
SGA:System Grobal Area Is dynamic,sized
Size by the SGA_MAX_SIZE parameter
Allocated and tracked in granules by SGA components
Contiguous virtual memory allocation
Granule size based on total estimated SGA_MAX_SIZE
SGA可以动态改变,最大的尺寸可以通过SGA_MAX_SIZE来改变。Granules是SGA的最小单位。SGA是连续的内存区域,并且最大不能超过 SGA_MAX_SIZE.
可以通过show sga 查看SGA 大小.
可以通过语句
select component,granule_size from v$sga_dynamic_components.
查看granule的大小
1.The SGA consists of several memory structures:
Shared Pool: SHARED_POOL_SIZE
Database Buffer Cache: DB_CACHE_SIZE
Redo Log Buffer: LOG_BUFFER
Other structures(for example ,lock and latch management,statistical data)
2.There are two additional memory structures that can be configured within the SGA:
Large Pool: LARGE_POOL_SIZE
Java Pool: JAVA_POOL_SIZE
Shared Pool Used to store
Most recently executed SQL statements
Most recently used data definitions
It consists of two key performance-related memory structures:
Library Cache
Data Dictionary Cache
Sized by the parameter
每一个SQL将被解析,制定执行计划。解析SQL语句被存到共享池中。包含两部分重要内容。为Library Cache和Data Dictionary Cache
Library Cache Stores information about the most recently used SQL and PL/SQL statements
Enables the sharing of commonly used statements
Is manager by a least recently user(LRU) algorithm
Consists of two structures:
Shared SQL area
Shared PL/SQL area
Size determined by the Shared Pool sizing
存储的是经过编译解析后的SQL语句和PL/SQL语句的内容.
包含两部分。一部分是SQL area ,一部分是PL/SQL area
大小由Shared Pool 管理
Data Dictionary Cache A collection of the most recently used definitions in the database
Includes information about database files, tables , indexes , columns , users, privileges ,and others database objects.
During the parse phase ,the server process looks at the data dictionary for information to resolve object names and validate access
Improves response time on queries and DML
Size determined by the Shared