13.You have executed this command to change the size of the database buffer cache:

13.You have executed this command to change the size of the database buffer cache:

SQL> ALTER SYSTEM SET DB_CACHE_SIZE=2516582;
System altered.
To verify the change in size, you executed this command:
SQL> SHOW PARAMETER DB_CACHE_SIZE
NAME           TYPE         VALUE
-------------  -----------  ------------------
db_cache_size  big integer  4194304
Why is the value set to 4194304 and not to 2516582?
A.because 4194304 is the granule size
B.because 4194304 is the standard block size
C.because 4194304 is the largest nonstandard block size defined in the database
D.because 4194304 is the total size of data already available in the database buffer cache
答案:A
解析:
先看下DB_CACHE_SIZE是什么东西
DB_CACHE_SIZE specifies the size of the DEFAULT buffer pool for buffers with the primary block size 
(the block size defined by the DB_BLOCK_SIZE initialization parameter).
The value must be at least 4M * number of cpus (smaller values are automatically rounded up to this value). 
A user-specified value larger than this is rounded up to the nearest granule size. 
A value of zero is illegal because it is needed for the DEFAULT memory pool of the primary block size, which is the block size for the SYSTEM tablespace.


详细说明http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams052.htm#REFRN10033
SGA下的数据库高速缓存区(database buffer cache): 
当执行了一条 select 语句,首先会在这里查找所需的数据,如果找到了,那么就不进行磁盘扫描,如果没找到那么就进行磁盘读取,然后读入到数据库高速缓冲区,它的大小由 db_block_size 和 db_block_buffer 的乘积来设置的,但是 db_block_size 不能动,9i之后可以修改 db_cache_size 来进行调整,它可以动态的进行调整
如果使用了自动共享内存管理,db_cache_size会自动设置为0



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值