读懂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++程序代码
要搞清楚别人的代码,首先,你要了解代码涉及的领域知识,这是最重要的,不懂领域知识,只看代码本身,不可能搞的明白.其次,你得找各种文档:需求文档(要做什么),设计文档(怎么做的),先搞清楚你即将要阅读是 ...
随机推荐
- HTTP-Runoob:HTPP消息结构
ylbtech-HTTP-Runoob:HTPP消息结构 1.返回顶部 1. HTTP 消息结构 HTTP是基于客户端/服务端(C/S)的架构模型,通过一个可靠的链接来交换信息,是一个无状态的请求/响 ...
- 重新认识synchronized(上)
synchronized在JDK5之前一直被称为重量级锁,是一个较为鸡肋的设计,而在JDK6对synchronized内在机制进行了大量显著的优化,加入了CAS,轻量级锁和偏向锁的功能,性能上已经跟R ...
- react-router4.x 组件和api介绍
react-router实用4.2.0 react-router非常复杂整体,比vue-router强大很多,好好研究,对你自身能力提高很有帮助 安装 cnpm install react-route ...
- python 函数和方法的区别
一.函数和方法的区别 1.函数要手动传self,方法不用传 2.如果是一个函数,用类名去调用,如果是一个额方法,用对象去调用 举例说明: class Foo(object): def __init__ ...
- Linux 命令及获取帮助 目录文件浏览,管理和维护
开启Linux操作系统,要求以root用户登录GNOME图形界面,语言支持选择为汉语 使用快捷键切换到虚拟终端2,使用普通用户身份登录,查看系统提示符 $ 使用命令退出虚拟终端2上登录的用户 exit ...
- 服务器启动时Webapp的web.xml中配置的加载顺序
一 1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Ser ...
- 数据从HDFS-->HIVE-->HBASE 执行过程
1.数据已经load进去hdfs 2.hive.hbase已经安装成功(我用的是hadoop 2.4 hbase 0.98.12 hive 1.2.1) 3.开始! 4.在hive建立表同时生成对应的 ...
- session详解&和cookie的区别
session简介 1. 定义 session用来保存会话数据, 将数据保存到服务器中. 2. 作用 在WEB开发中,服务器可以为每个用户浏览器创建一个会话对象(session对象),一个浏览器独占一 ...
- [poj2653]Pick-up sticks
题目大意:给定一系列线段,以及放在平面上的顺序,给出没有被其他覆盖的线段. 解题关键:线段相交的判断. 满足两个条件即可:快速排斥实验.跨立实验. #include<cstdio> #in ...
- 学习CSS的思路(转)
两周之前写过该系列的第一篇,其实当时只是一个想法,这段时间迟迟未更新,是在思考一个解决过程.现在初有成效,就开更吧. 1. 一个段子 开题不必太严肃,写博客也不像写书,像聊天似的写东西是最好的表达方式 ...