Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

0

好友

11

主题
1#
发表于 2013-3-27 18:08:00 | 查看: 4502| 回复: 2
请教各位v$sgastat的问题,下面是从v$sgastat的输出
NAME                       BYTES/1024/1024
-------------------------- ---------------
sql area                        1136.02221
library cache                   493.712532

按照oracle官方文档对library cache的解释
The library cache includes the shared SQL areas, private SQL areas (in the case of a multiple transaction server), PL/SQL procedures and packages, and control structures such as locks and library cache handles.

Oracle represents each SQL statement it runs with a shared SQL area and a private SQL area. Oracle recognizes when two users are executing the same SQL statement and reuses the shared SQL area for those users.
A shared SQL area contains the parse tree and execution plan for a given SQL statement. Oracle saves memory by using one shared SQL area for SQL statements run multiple times, which often happens when many users run the same application.
及很多的文档和书籍的描述
sql area 属于lib cache的一部分,为什么v$sgastat上的lib cache的大小比sql area小那么多。
下图是understanding shared pool memory structure文档里的shared pool描述,sql area和library cache是分开的
1.jpg

下图是SG中对sga 的描述,和上面的图不太一样,
2.jpg

我的理解是是存储sql 执行计划的sqlarea是library cache的一部分。为什么时v$sgastat的输出和预想的不一样(lib cache>sqlare)?
如果我的理解有误的话请指正,谢谢!
2#
发表于 2013-3-27 21:09:41
文档里的library cache是一个大概念, 不是 真实的heap manager里的library cache

回复 只看该作者 道具 举报

3#
发表于 2013-3-28 09:18:17
谢谢,刘大!
下面这个是tom网站上对别人的回答
library cache -- table defs, constraints, indexes, etc.  "data dictionary" stuff.
shared pool sql area -- your sql, its plan, its security needs, etc.
做librarycache转储的时候应该就是heap manager里的library cache吧?

v$librarycache指的是不是就是大概念的?在oracle的文档里会在什么情况下使用这种大概念的多?

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-5-19 11:59 , Processed in 0.048202 second(s), 23 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569