11:18:23 SQL> alter system set sga_target=500m ;
alter system set sga_target=500m
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00823: Specified value of sga_target greater than sga_max_size
11:18:38 SQL> alter system set sga_target=500m scope=spfile;
System altered.
11:18:54 SQL> startup force;
Oracle instance started.
Total System Global Area 524288000 bytes
Fixed Size 1220360 bytes
Variable Size 176161016 bytes
Database Buffers 343932928 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
11:19:30 SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 500M
sga_target big integer 500M
11:19:38 SQL>
利用后台进程MMAN进行SGA动态管理
[oracle@oracle ~]$ ps -ef |grep ora_|grep ora_
oracle 8012 1 0 11:12 ? 00:00:00 ora_mman_prod
share pool:
共享池(Share Pool)用于存放最近执行的SQL语句和数据字典信息。
共享池主要有库高速缓存(Library Cache)和数据字典高速缓存(Dictionary cache)两部分组成
1)库高速缓存(Library Cache)
库高速缓存用于存放最近执行的sql语句信息,包括sql语句文本,解析代码值及执行计划。
假设执行一条sql语句
-select ename,job from emp where empno=7788;
如果最近(还没有被lru淘汰)执行过这条语句,他就会直接从cache里面读结果;如果没有执行过,就需要读数据文件,这个过程就比较复杂,效率差距很大。
http://blog.csdn.net/yujin2010good/article/details/7235864
这里还有两个概念:
物理i/o和逻辑i/o---------1:1000
物理i/o:从数据缓冲区找不到所需要的数据,就要从硬盘里面读取。
逻辑i/o:从数据缓冲区能找到所需要的数据,
理论上讲一个数据库性能是否良好,这个逻辑i/o应该占95%以上
dave哥对命中率有详细的描述
http://blog.csdn.net/tianlesoftware/article/details/4674153
2)、数据字典高速缓存区(Dictionary cache)
用于存放数据字典的信息,包括表、列定义以及权限信息)
库高速缓存和数据字典高速缓存大小是动态变化的,不是固定的。
SQL> alter system set share_pool_size=60m;
DB buffer
数据高速缓存(Database Buffer cache)用于存放最近访问的数据块信息,它由许多小缓冲区(缓冲区大小=数据尺寸)组成
Db_cache_size 定义标准的高速缓存尺寸
Db_nk_cache_size 定义非标准的高速缓存尺寸

数据库高速缓存区:
Db_cache_size Default 默认池,所有段都被默认高速缓存到默认池。(采用LRU)
Db_keep_cache_size ,确保某些数据块始终被保留到内存中
Db_recycle_cache_size ,数据高速缓存区“回收池”
