oracle trace文件解析 *** 2006-02-23 22:11:45.000 ===================== PARSING IN CURSOR #1 len=68 dep=0 uid=59 oct=42 lid=59 tim=12047812267 hv=570864185 ad=66bd0bc4 alter session set events 10046 trace name context forever,level 12 END O
oracle trace文件解析 *** 2006-02-23 22:11:45.000
=====================
PARSING IN CURSOR #1 len=68 dep=0 uid=59 oct=42 lid=59 tim=12047812267 hv=570864185 ad='66bd0bc4'
alter session set events '10046 trace name context forever,level 12'
END OF STMT
EXEC #1:c=0,e=89,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=12047812255
WAIT #1: nam='SQL*Net message to client' ela= 5 p1=1111838976 p2=1 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 3350384 p1=1111838976 p2=1 p3=0
=====================
PARSING IN CURSOR #1 len=57 dep=0 uid=59 oct=3 lid=59 tim=12051164358 hv=1391558827 ad='66bfe7d8'
select count(*) from emp a,dept b where a.deptno=b.deptno
END OF STMT
PARSE #1:c=0,e=76,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=12051164349
BINDS #1:
EXEC #1:c=0,e=192,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=12051165308
WAIT #1: nam='SQL*Net message to client' ela= 7 p1=1111838976 p2=1 p3=0
FETCH #1:c=0,e=140,p=0,cr=5,cu=0,mis=0,r=1,dep=0,og=4,tim=12051165720
WAIT #1: nam='SQL*Net message from client' ela= 302 p1=1111838976 p2=1 p3=0
FETCH #1:c=0,e=4,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=12051166486
WAIT #1: nam='SQL*Net message to client' ela= 4 p1=1111838976 p2=1 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 3248265 p1=1111838976 p2=1 p3=0
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='SORT AGGREGATE '
STAT #1 id=2 cnt=14 pid=1 pos=1 obj=0 op='NESTED LOOPS '
STAT #1 id=3 cnt=14 pid=2 pos=1 obj=30139 op='TABLE ACCESS FULL EMP '
STAT #1 id=4 cnt=14 pid=2 pos=2 obj=30138 op='INDEX UNIQUE SCAN PK_DEPT '
=====================
PARSING IN CURSOR #1 len=55 dep=0 uid=59 oct=42 lid=59 tim=12054418195 hv=3381932903 ad='66bd7b34'
alter session set events '10046 trace name context off'
END OF STMT
PARSE #1:c=15625,e=703,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,
tim=12054418182
BINDS #1:
EXEC #1:c=0,e=321,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=12054419670
#######################################
PARSING IN CURSOR #1 len=68 dep=0 uid=59 oct=42 lid=59 tim=12047812267 hv=570864185 ad='66bd0bc4'
Cursor# 游标号
len SQL语句的长度
dep SQL语句的递归深度
Uid 当前模式中的用户ID
Oct Oracle命令类型
Lid 用于核对访问权限的用户ID
Tim 一个计时器,精度以1%秒为单位
Ha SQL语句的散列ID号
Ad 指向SQL语句的V$SQLAREA的ADDR列
EXEC Cursor#:c=%d,e=%d,p=%d,cr=%d,cu=%d,mis=%d,r=%d,dep=%d,og=%d,tim=%d
EXEC #1:c=0,e=89,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=12047812255
Cursor# 光标号
c 以1%秒为单位的CPU运行时间
e 以1%秒为单位的经过的时间
p 所执行的物理读的数量
cr Consistent模式下的读(逻辑输入/输出)
cu Current模式下的读(逻辑输入/输出)
mis 丢失在数据库缓存中的游标,指出由于它在数据共享区中老化,
或不在数据共享池里,或其他造成无效的原因
r 处理的行数
dep SQL语句的递归深度
og 优化器目标,1=所有行,2=起始行,3=规则,4=选择
tim 计时器,精度以1%秒为单位的时间
PARSE 分析一个语句
FETCH 从游标中取出所需行时
UNMAP 用以从程序运行中间结果中释放一些不再用到的临时段
SORT UNMAP 和unmap类似,只不过用于排序段
WAIT Cursor#:nam='%s' ela=%d p1=%ul p2=%ul p3=%ul
WAIT #1: nam='SQL*Net message to client' ela= 5 p1=1111838976 p2=1 p3=0
WAIT #1: nam='SQL*Net message from client' ela= 3350384 p1=1111838976 p2=1 p3=0
Cursor# 游标号
nam 等待事件的名称。Oracle Server Reference中列出了全部等待事件,并有详细解释
ela 以1%秒为单位的事件经过的时间
p1,p2,p3 专门用于等待事件的参数。每一个事件都有它自己的一套参数。
参考Oracle Server Reference中关于特定等待事件的参数p1,p2,p3的含义