Erp100论坛's Archiver

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

学习动态性能表(二)

[align=left][align=left][font=宋体]按照[/font][font=Times New Roman]OracleOnlineBook[/font][font=宋体]中的描述,[/font][font=Times New Roman]v$sesstat[/font][font=宋体]存储[/font][font=Times New Roman]session[/font][font=宋体]从[/font][font=Times New Roman]login[/font][font=宋体]到[/font][font=Times New Roman]logout[/font][font=宋体]的详细资源使用统计。[/font][/align][/align][font=Times New Roman] [/font]
[font=宋体]  类似于[/font][font=Times New Roman]v$sysstat,[/font][font=宋体]该视图存储下列类别的统计:[/font]
[font=Times New Roman] [/font]
[font=Wingdings]l
[/font][font=宋体]事件发生次数的统计,如用户提交数。[/font]
[font=Wingdings]l
[/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=Wingdings]l
[/font][font=宋体]执行操作所花费的时间累积,例如[/font][font=Times New Roman]session CPU[/font][font=宋体]占用[/font][font=Times New Roman]([/font][font=宋体]如果[/font][font=Times New Roman]TIMED_STATISTICS[/font][font=宋体]值为[/font][font=Times New Roman]true)[/font]
[font=宋体]注意:[/font]
[font=宋体]如果初始参数[/font][font=Times New Roman]STATISTICS_LEVEL[/font][font=宋体]被设置为[/font][font=Times New Roman]TYPICAL[/font][font=宋体]或[/font][font=Times New Roman]ALL[/font][font=宋体],时间统计被数据库自动收集如果[/font][font=Times New Roman]STATISTICS_LEVEL[/font][font=宋体]被设置为[/font][font=Times New Roman]BASIC[/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]DB_CACHE_ADVICE,TIMED_STATISTICS[/font][font=宋体]或[/font][font=Times New Roman]TIMED_OS_STATISTICS[/font][font=宋体],或在初始参数文件或使用[/font][font=Times New Roman]ALTER_SYSTEM[/font][font=宋体]或[/font][font=Times New Roman]ALTER SESSION[/font][font=宋体],那么你所设定的值的值将覆盖[/font][font=Times New Roman]STATISTICS_LEVEL[/font][font=宋体]的值。[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]v$sysstat[/font][font=宋体]和[/font][font=Times New Roman]v$sesstat[/font][font=宋体]差别如下:[/font]
[font=Wingdings]n
[/font][font=Times New Roman]v$sesstat[/font][font=宋体]只保存[/font][font=Times New Roman]session[/font][font=宋体]数据,而[/font][font=Times New Roman]v$sysstat[/font][font=宋体]则保存所有[/font][font=Times New Roman]sessions[/font][font=宋体]的累积值。[/font]
[font=Wingdings]n
[/font][font=Times New Roman]v$sesstat[/font][font=宋体]只是暂存数据,[/font][font=Times New Roman]session[/font][font=宋体]退出后数据即清空。[/font][font=Times New Roman]v$sysstat[/font][font=宋体]则是累积的,只有当实例被[/font][font=Times New Roman]shutdown[/font][font=宋体]才会清空。[/font]
[font=Wingdings]n
[/font][font=Times New Roman]v$sesstat[/font][font=宋体]不包括统计项名称,如果要获得统计项名称则必须与[/font][font=Times New Roman]v$sysstat[/font][font=宋体]或[/font][font=Times New Roman]v$statname[/font][font=宋体]连接查询获得。[/font]
[font=Times New Roman] [/font]
[font=Times New Roman]v$sesstat[/font][font=宋体]可被用于找出如下类型[/font][font=Times New Roman]session[/font][font=宋体]:[/font]
[font=Wingdings]n
[/font][font=宋体]高资源占用[/font]
[font=Wingdings]n
[/font][font=宋体]高平均资源占用比[/font][font=Times New Roman]([/font][font=宋体]登陆后资源使用率[/font][font=Times New Roman])[/font]
[font=Wingdings]n
[/font][font=宋体]默认资源占用比[/font][font=Times New Roman]([/font][font=宋体]两快照之间[/font][font=Times New Roman])[/font]
[font=Times New Roman] [/font]
[b][font=宋体]在[/font][font=Times New Roman]V$SESSTAT[/font][/b][b][font=宋体]中使用统计[/font][/b]
[font=宋体]  多数[/font][font=Times New Roman]v$sesstat[/font][font=宋体]中的统计参考是[/font][font=Times New Roman]v$sysstat[/font][font=宋体]描述的子集,包括[/font][font=Times New Roman]session logical reads, CPU used by this session, db block changes, redo size, physical writes, parse count (hard), parse count (total), sorts (memory), and sorts (disk).[/font]
[font=Times New Roman] [/font]
[b][font=Times New Roman]V$SESSTAT[/font][/b][b][font=宋体]常用列说明[/font][/b]
[font=Wingdings]n
[/font][font=Times New Roman]SID[/font][font=宋体]:[/font][font=Times New Roman]session[/font][font=宋体]唯一[/font][font=Times New Roman]ID[/font]
[font=Wingdings]n
[/font][font=Times New Roman]STATISTIC#[/font][font=宋体]:资源唯一[/font][font=Times New Roman]ID[/font]
[font=Wingdings]n
[/font][font=Times New Roman]VALUE[/font][font=宋体]:资源使用[/font]

页: [1]

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