ITPub博客

首页 > 数据库 > Oracle > sql_trace 原文件解析

sql_trace 原文件解析

原创 Oracle 作者:pxbibm 时间:2014-09-30 11:25:25 0 删除 编辑

sql_trace 原文件解析

=====================
PARSING IN CURSOR #4 len=23 dep=0 uid=0 oct=3 lid=0 tim=1378949361279410 hv=52404428 ad='3ef0e6bc'
select * from scott.emp
END OF STMT
PARSE #4:c=18998,e=113190,p=7,cr=89,cu=0,mis=1,r=0,dep=0,og=1,tim=1378949361279407
EXEC #4:c=0,e=27,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=1378949361279464
FETCH #4:c=0,e=62,p=0,cr=3,cu=0,mis=0,r=1,dep=0,og=1,tim=1378949361279573
FETCH #4:c=0,e=22,p=0,cr=1,cu=0,mis=0,r=14,dep=0,og=1,tim=1378949361279897
STAT #4 id=1 cnt=15 pid=0 pos=1 obj=9739 op='TABLE ACCESS FULL EMP (cr=4 pr=0 pw=0 time=58 us)'
*** 2014-09-30 10:31:09.551
=====================

PARSING IN CURSOR 部分
len-----------被分析SQL的长度
dep-----------产生递归SQL的深度
uid-----------user id
otc-----------oracle command type 命令的类型
tim-----------时间戳
hv------------hash value
ad------------SQL address


PARSE EXEC FETCH 部分
c-------------消耗的cpu 时间
e-------------elapsed time操作的用时
p-------------physical reads 物理读的次数
cr------------consistent reads 一致性方式读取的数据块
cu------------current方式读取的数据块
mis-----------cursor miss in cache硬分析次数
r-------------rows处理的行数
dep-----------depth递归SQL的深度
og------------optimizer goal 优化器模式
tim-----------timestamp 时间戳

STAT 部分
id------------执行计划的行源号
cnt-----------当前行源返回的行数
pid-----------当前行源号的父号
pos-----------执行计划中的位置
obj-----------当前操作的对象ID
op------------当前行源的数据访问操作

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12798004/viewspace-1285740/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
【DBAplus社群】联合发起人。ACOUG核心成员,Oracle用户组年轻专家。熟悉Oracle的体系结构,擅长Oracle数据库架构规划、SQL优化、OWI方面性能的优化。曾服务于航天、航空、机车、大型制造行业数据库的维护以及系统开发工作,开发过基于Oracle数据库的大型ERP系统。
  • 博文量
    341
  • 访问量
    2469797