Oracle体系结构及备份(六)——sga-shared_pool

159 篇文章 113 订阅
86 篇文章 1 订阅

一 什么是shared_pool

 

 

        The shared pool portion of the SGA contains the library cache, the dictionary cache, the result cache, buffers for parallel execution messages, and control structures.

 

        This section includes the following topics:

 

        Library Cache

        The library cache includes the shared SQL areas, private SQL areas (in the case of a shared server configuration), PL/SQL procedures and packages, and control structures such as locks and library cache handles.

 

        Shared SQL areas are accessible to all users, so the library cache is contained in the shared pool within the SGA.

 

 

        Dictionary Cache

        The data dictionary is a collection of database tables and views containing reference information about the database, its structures, and its users. Oracle Database accesses the data dictionary frequently during SQL statement parsing. This access is essential to the continuing operation of Oracle Database.

 

        The data dictionary is accessed so often by Oracle Database that two special locations in memory are designated to hold dictionary data. One area is called the data dictionary cache, also known as the row cache because it holds data as rows instead of buffers (which hold entire blocks of data). The other area in memory to hold dictionary data is the library cache. All Oracle Database user processes share these two caches for access to data dictionary information.

 

 

        Result Cache

        The result cache is composed of the SQL query result cache and PL/SQL function result cache, which share the same infrastructure.

 

        The DBMS_RESULT_CACHE package provides administration subprograms, which, for example, flush all cached results and turn result-caching on or off systemwide. The dynamic performance views V$RESULT_CACHE_* allow the developer and DBA to determine, for example, the cache-hit success for a certain SQL query or PL/SQL function.

 

        Similar to the result cache, the client result cache also caches results, except that the caching is done on the client side.

 

        用于存储:

        最近执行的SQL语句

        最近使用的数据定义

 

        由三个与性能相关的部分组成

        库缓存

        数据字典缓存

        结果缓存

 

        由参数SHARED_POOL_SIZE决定大小。

 

 

 

二 操作示例

 

SQL> show parameter shared_pool_size;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size		     big integer 12M
SQL> show parameter sga_target;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
sga_target			     big integer 160M


三 总结

        1. 用于存储:最近执行的SQL语句、最近使用的数据定义;

        2.由三个与性能相关的部分组成:库缓存、数据字典缓存、结果缓存;

        3.可以通过参数shared_pool_size查看共享池的大小。

 



  我的邮箱wgbno27@163.com
  新浪微博@Wentasy27         
  微信公众平台:JustOracle(微信号:justoracle)
 IT交流群:336882565(加群时验证 From CSDN XXX)
 Oracle交流讨论组https://groups.google.com/d/forum/justoracle
  By Larry Wen


katoonSina   CSDN
@Wentasy 博文仅供参考,欢迎大家来访。如有错误之处,希望批评指正。原创博文如需转载请注明出处,谢谢 :) [CSDN博客]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值