Erp100论坛's Archiver

xiangzhao 发表于 2008-7-13 10:42

学习动态性能表(一)

[font=宋体]按照[/font][font=Times New Roman]OracleDocument[/font][font=宋体]中的描述,[/font][font=Times New Roman]v$sysstat[/font][font=宋体]存储自数据库实例运行那刻起就开始累计全实例[/font][font=Times New Roman](instance-wide)[/font][font=宋体]的资源使用情况。[/font]
[font=Times New Roman] [/font]
[b][font=宋体]类似于[/font][font=Times New Roman]v$sesstat[/font][/b][b][font=宋体],该视图存储下列的统计信息:[/font][/b]
[font=Times New Roman]1>.[/font][font=宋体]事件发生次数的统计[/font][font=Times New Roman]([/font][font=宋体]如:[/font][font=Times New Roman]user commits)[/font]
[font=Times New Roman]2>.[/font][font=宋体]数据产生,存取或者操作的[/font][font=Times New Roman]total[/font][font=宋体]列[/font][font=Times New Roman]([/font][font=宋体]如:[/font][font=Times New Roman]redo size)[/font]
[font=Times New Roman]3>.[/font][font=宋体]如果[/font][font=Times New Roman]TIMED_STATISTICS[/font][font=宋体]值为[/font][font=Times New Roman]true,[/font][font=宋体]则统计花费在执行操作上的总时间[/font][font=Times New Roman]([/font][font=宋体]如:[/font][font=Times New Roman]CPU used by this session)[/font]
[font=Times New Roman] [/font]
[b][font=Times New Roman]v$sysstat[/font][/b][b][font=宋体]视图常用列介绍:[/font][/b]
[font=Wingdings]l
[/font][font=Times New Roman]STATISTIC#: [/font][font=宋体]标识[/font]
[font=Wingdings]l
[/font][font=Times New Roman]NAME: [/font][font=宋体]统计项名称[/font]
[font=Wingdings]l
[/font][font=Times New Roman]VALUE: [/font][font=宋体]资源使用量[/font]
[font=宋体]该视图还有一列[/font][font=Times New Roman]class-[/font][font=宋体]统计类别但极少会被使用,各类信息如下:[/font]
[font=Times New Roman]1 [/font][font=宋体]代表事例活动[/font]
[font=Times New Roman]2 [/font][font=宋体]代表[/font][font=Times New Roman]Redo buffer[/font][font=宋体]活动[/font]
[font=Times New Roman]4 [/font][font=宋体]代表锁[/font]
[font=Times New Roman]8 [/font][font=宋体]代表数据缓冲活动[/font]
[font=Times New Roman]16 [/font][font=宋体]代表[/font][font=Times New Roman]OS[/font][font=宋体]活动[/font]
[font=Times New Roman]32 [/font][font=宋体]代表并行活动[/font]
[font=Times New Roman]64 [/font][font=宋体]代表表访问[/font]
[font=Times New Roman]128 [/font][font=宋体]代表调试信息[/font]
[font=宋体]注意:[/font][font=Times New Roman]Statistic#[/font][font=宋体]的值在不同版本中各不相同,使用时要用[/font][font=Times New Roman]Name[/font][font=宋体]做为查询条件而不要以[/font][font=Times New Roman]statistic#[/font][font=宋体]的值做为条件。[/font]
[font=Times New Roman] [/font]
[b][font=宋体]使用[/font][font=Times New Roman]v$sysstat[/font][/b][b][font=宋体]中的数据[/font][/b]
[font=Times New Roman] [/font]
[font=宋体]  该视图中数据常被用于监控系统性能。如[/font][font=Times New Roman]buffer cache[/font][font=宋体]命中率、软解析率等都可从该视图数据计算得出。[/font]
[font=宋体]  该视图中的数据也被用于监控系统资源使用情况,以及系统资源利用率的变化。正因如此多的性能数据,检查某区间内系统资源使用情况可以这样做,在一个时间段开始时创建一个视图数据快照,结束时再创建一个,二者之间各统计项值的不同[/font][font=Times New Roman](end value - begin value)[/font][font=宋体]即是这一时间段内的资源消耗情况。这是[/font][font=Times New Roman]oracle[/font][font=宋体]工具的常用方法,诸如[/font][font=Times New Roman]Statspack[/font][font=宋体]以及[/font][font=Times New Roman]BSTAT/ESTAT[/font][font=宋体]都是如此。[/font]
[font=宋体]  为了对比某个区间段的数据,源数据可以被格式化(每次事务,每次执行,每秒钟或每次登陆),格式化后数据更容易从两者中鉴别出差异。这类的对比在升级前,升级后或仅仅想看看一段时间内用户数量增长或数据增加如何影响资源使用方面更加实用。[/font]
[font=宋体]  你也可以使用[/font][font=Times New Roman]v$sysstat[/font][font=宋体]数据通过查询[/font][font=Times New Roman]v$system_event[/font][font=宋体]视图来检查资源消耗和资源回收。[/font]

[[i] 本帖最后由 xiangzhao 于 2008-7-13 10:43 编辑 [/i]]

leexiaodong 发表于 2008-7-28 15:53

这个,好像是“三思”君的

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2007 Comsenz Inc.