您的位置:首页 > 数据库 > Oracle

Oracle V$ROWCACHE

2013-04-05 16:05 183 查看

Oracle V$ROWCACHE

V$ROWCACHE
V$ROWCACHE
displays statistics for data dictionary activity. Each row contains statistics for one data dictionary cache.

Column Datatype Description
CACHE#
NUMBER
Row cache ID number
TYPE
VARCHAR2(11)
Parent or subordinate row cache type
SUBORDINATE#
NUMBER
Subordinate set number
PARAMETER

VARCHAR2(32)
Name of the initialization parameter that determines the number of entries in the data dictionary cache
COUNT
NUMBER
Total number of entries in the cache
USAGE
NUMBER
Number of cache entries that contain valid data
FIXED
NUMBER
Number of fixed entries in the cache
GETS

NUMBER
Total number of requests for information on the data object
GETMISSES
NUMBER
Number of data requests resulting in cache misses
SCANS
NUMBER
Number of scan requests
SCANMISSES

NUMBER
Number of times a scan failed to find the data in the cache
SCANCOMPLETES
NUMBER
For a list of subordinate entries, the number of times the list was scanned completely
MODIFICATIONS
NUMBER
Number of inserts, updates, and deletions
FLUSHES
NUMBER
Number of times flushed to disk
DLM_REQUESTS

NUMBER
Number of DLM requests
DLM_CONFLICTS
NUMBER
Number of DLM conflicts
DLM_RELEASES
NUMBER
Number of DLM releases
学习动态性能表

第16篇--V$ROWCACHE 2007.6.12

  本视图显示数据字典缓存(也叫rowcache)的各项统计。每一条记录包含不同类型的数据字典缓存数据统计,注意数据字典缓存有层次差别,因此同样的缓存名称可能不止一次出现。

V$ROWCACHE常用列

l PARAMETER:缓存名

l COUNT:缓存项总数

l USAGE:包含有效数据的缓存项数

l GETS:请求总数

l GETMISSES:请求失败数

l SCANS:扫描请求数

l SCANMISSES:扫描请求失败次数

l MODIFICATIONS:添加、修改、删除操作数

l DLM_REQUESTS:DLM请求数

l DLM_CONFLICTS:DLM冲突数

l DLM_RELEASES:DLM释放数

使用V$ROWCACHE数据

1>.确认数据字典缓存是否拥有适当的大小。如果shared pool过小,那数据字典缓存就不足以拥有合适的大小以缓存请求信息。

2>.确认应用是否有效访问缓存。如果应用设计未能有效使用数据字典缓存(比如,大数据字典缓存并不有助于解决性能问题)。例如,DC_USERS缓存在过去某段时期内出现大量GETS,看起来像是数据库中创建了大量的不同用户,并且应用记录下用户频繁登陆和注销。通过检查logon比率以及系统用户数可以验证上述数据。同时解析比率也会很高,如果这是一个大型的OLTP系统的中间层,它可能在中间层更有效的管理个别帐户,允许中间层以单用户登陆成为应用所有者。通过保持活动连接来减少logon/logoff比率也同样有效。

3>.确认是否发生动态空间分配。DC_SEGMENTS, DC_USED_EXTENTS, 以及DC_FREE_EXTENTS大量的类似大小修改将指出存在大量动态空间分配。可行的解决方案包括指定下一个区大小或者使用本地管理表空间。如果发生空间分配的是临时的表空间,则可以为其指定真正的临时表空间(If the space allocation is occurring on the temp tablespace, then use a true temporary tablespace for the
temp. )。

4>.dc_sequences值的变化指出是否大量sequence号正在产生。

5>.搜集硬解析的证据。硬解析常表现为大量向DC_COLUMNS, DC_VIEWS 以及 DC_OBJECTS caches的gets。

示例:

1.分组统计数据字典统计项

SELECT parameter,sum("COUNT"),sum(usage),sum(gets),sum(getmisses),

sum(scans),sum(scanmisses),sum(modifications),

sum(dlm_requests),sum(dlm_conflicts),sum(dlm_releases)

FROM V$ROWCACHE

GROUP BY parameter;

2.检查数据字典的命中率

select 1 - sum(getmisses) / sum(gets) "data dictionary hitratio" from v$rowcache;

from:http://hi.baidu.com/bystander1983/item/25de6f0c6514dae7f55ba62a
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: