读懂sql_trace
TKPROF: Release 11.2.0.1.0 - Development on 星期一 11月 3 21:39:41 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Trace file: c:\orcl_ora_4075.trc
Sort options: default ********************************************************************************
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
******************************************************************************** SQL ID: 4tk6t8tfsfqbf
Plan Hash: 0
alter session set sql_trace=true call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 0 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 1 0.00 0.00 0 0 0 0 Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS
******************************************************************************** select t.ename,m.dname from scott.EMP t,scott.dept m where t.deptno=m.deptno
and m.deptno=88 call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 7 0.01 0.01 0 84 0 90
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 9 0.01 0.01 0 84 0 90 Misses in library cache during parse: 0--如果是软分析这里为0 硬分析为1
Optimizer mode: ALL_ROWS
Parsing user id: SYS /*
cr=222957 -- 一致性读取数据库的块数 --相当于FETCH query的数目
pr=222186 -- 物理读取
pw=0 -- 物理写
time=100000562 us -- 占用时间,单位:微妙 百万分之一秒
rows --实际返回的行数 */ Rows Row Source Operation
------- ---------------------------------------------------
90 NESTED LOOPS (cr=84 pr=0 pw=0 time=0 us cost=4 size=22 card=1)
1 TABLE ACCESS BY INDEX ROWID DEPT (cr=2 pr=0 pw=0 time=0 us cost=1 size=13 card=1)
1 INDEX UNIQUE SCAN PK_DEPT (cr=1 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 73180)
90 TABLE ACCESS FULL EMP (cr=82 pr=0 pw=0 time=0 us cost=3 size=9 card=1) ******************************************************************************** SQL ID: aam2chsgpj7mb
Plan Hash: 0
alter session set sql_trace=false call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 2 0.00 0.00 0 0 0 0 Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: SYS ******************************************************************************** OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 2 0.00 0.00 0 0 0 0
Execute 3 0.00 0.00 0 0 0 0
Fetch 7 0.01 0.01 0 84 0 90
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 12 0.01 0.02 0 84 0 90 Misses in library cache during parse: 1
Misses in library cache during execute: 1 OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 0 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 0 0.00 0.00 0 0 0 0 Misses in library cache during parse: 0 3 user SQL statements in session.
0 internal SQL statements in session.
3 SQL statements in session.
********************************************************************************
Trace file: c:\orcl_ora_4075.trc
Trace file compatibility: 11.1.0.7
Sort options: default 1 session in tracefile.
3 user SQL statements in trace file.
0 internal SQL statements in trace file.
3 SQL statements in trace file.
3 unique SQL statements in trace file.
57 lines in trace file.
13 elapsed seconds in trace file.
读懂sql_trace的更多相关文章
- 使用 10046 查看执行计划并读懂 trace 文件
查看 sql 执行计划的方法有许多种, 10046 事件就是其中的一种. 与其他查看 sql 执行计划不同, 当我们遇到比较复杂的 sql 语句, 我们可以通过 10046 跟踪 sql 得到执行计划 ...
- 读懂UI设计的心理学
好文转载,版权归原作者 作为UI设计师,对待用户就像对待婴儿,知道如何通过界面设计诱导用户非常重要,这就需要了解心理学方面的知识了.今天分享一篇日本设计师的好文,结合心理学与设计,教你读懂心理学,提高 ...
- 一文读懂UGC:互联网上的生态秘密
转载自近乎: UGC(User- Generated Content)用户原创生产内容,它是相对于PGC(Professionally-produced Content)专业生产内容的一种内容来源,简 ...
- 读懂IL代码就这么简单(三)完结篇
一 前言 写了两篇关于IL指令相关的文章,分别把值类型与引用类型在 堆与栈上的操作区别详细的写了一遍 这第三篇也是最后一篇,之所以到第三篇就结束了,是因为以我现在的层次,能理解到的都写完了,而且个人认 ...
- 读懂IL代码就这么简单(二)
一 前言 IL系列 第一篇写完后 得到高人指点,及时更正了文章中的错误,也使得我写这篇文章时更加谨慎,自己在了解相关知识点时,也更为细致.个人觉得既然做为文章写出来,就一定要保证比较高的质量,和正确率 ...
- 读懂IL代码就这么简单 (一)
一前言 感谢 @冰麟轻武 指出文章的错误之处,现已更正 对于IL代码没了解之前总感觉很神奇,初一看完全不知所云,只听高手们说,了解IL代码你能更加清楚的知道你的代码是如何运行相互调用的,此言一出不明觉 ...
- 一张图读懂https加密协议
搭建CA服务器和iis启用https:http://blog.csdn.net/dier4836/article/details/7719532 一张图读懂https加密协议 https是一种加密传输 ...
- Gradle学习系列之三——读懂Gradle语法
在本系列的上篇文章中,我们讲到了创建Task的多种方法,在本篇文章中,我们将学习如何读懂Gradle. 请通过以下方式下载本系列文章的Github示例代码: git clone https://git ...
- 如何快速读懂大型C++程序代码
要搞清楚别人的代码,首先,你要了解代码涉及的领域知识,这是最重要的,不懂领域知识,只看代码本身,不可能搞的明白.其次,你得找各种文档:需求文档(要做什么),设计文档(怎么做的),先搞清楚你即将要阅读是 ...
随机推荐
- 机器学习:多项式回归(scikit-learn中的多项式回归和 Pipeline)
一.scikit-learn 中的多项式回归 1)实例过程 模拟数据 import numpy as np import matplotlib.pyplot as plt x = np.random. ...
- Centos 7.2 编译安装 git
一. 下载最新版GIT安装包: https://www.kernel.org/pub/software/scm/git/ 选择想要安装的版本,下载,解压 命令: .tar.gz $ cd git- 二 ...
- 11-03SQLserver基础--子查询语句
一.子查询--查询的嵌套(重点记忆) select MAX(age)from haha where bumen='销售部' --汇总-- select MAX(age)from haha where ...
- Java判断字符串是否包含数字
public static boolean isContainNumber(String company) { Pattern p = Pattern.compile("[0-9]" ...
- LinkedHashMap和HashMap的区别
一.问题描述: 前几天写webservices接口,需要同步人力资源,涉及到添加顺序:主账号需要添加在次账号之前,直接上级需要添加在下级之前.解析xml之后直接封装在HashMap中,导致取对象时顺序 ...
- JavaScript的self和this使用小结
一.self这个非常简单.我们知道,打开任何一个网页,浏览器会首先创建一个窗口,这个窗口就是一个window对象,也是js运行所依附的全局环境对象和全局作用域对象.self 指窗口本身,它返回的对象跟 ...
- java网络编程安全问题
客户端与服务器互相传输时传输的数据的原内容会不会被人获取到? 在客户端与服务器之间有很多通信节点,数据在这些节点上传输前,可以先获取他们的安全证书,至于当心怕被修改可以用SSL加密(个人见解,这方面懂 ...
- cmake利用toolchain.cmake生成makefile之后,make生成静态库失败问题
问题描述 利用toolchian.cmake设置好编译器后,利用make指令生成静态库,出现以下问题 Error running link command: No such file or direc ...
- ld 链接选项-L,-rpath-link,-rpath
转载自:http://blog.csdn.net/q1302182594/article/details/42102961 1. 三个C文件 1. world.c #include<stdio. ...
- Mat类的输出格式
从前面的例程中, 可以看到 Mat 类重载了<<操作符, 可以方便得使用流操作来输出矩阵的内容.默认情况下输出的格式是类似 Matlab 中矩阵的输出格式.除了默认格式,Mat 也支持其他 ...