SET AUTOTRACE(转载)
注意;*autotrace功能只能在SQL*PLUS里使用
声明:本文为转载,如果有侵犯知识版权,请通知本人,本人将即刻停止侵权行为:
网址;http://blog.csdn.net/huanghui22/article/details/1326227
https://netfiles.uiuc.edu/jstrode/www/oraplus/plus_set_autotrace.html
http://www.cnblogs.com/chinhr/archive/2009/03/14/1412105.html
http://www.linuxidc.com/Linux/2012-06/62802.htm
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9010.htm#i2061796
http://docs.oracle.com/cd/B19306_01/server.102/b14357/ch8.htm#i1037226
explan plan的各个参数的解释:
http://docs.oracle.com/cd/B19306_01/server.102/b14211/ex_plan.htm
SET AUTOTRACE
Displays a report on the execution of successful SQL DML statements (SELECT, INSERT, UPDATE or DELETE).
Prerequisites:
♦ Must have PLUSTRCE role. Run $ORACLE_HOME/sqlplus/admin/plustrce.sql as SYS to create. |
♦ Must have PLAN_TABLE in user schema. Run $ORACLE_HOME/rdbms/admin/utlxplan.sql To set up for use by non-dba users: create public synonym plan_table for system.PLAN_TABLE and GRANT all on plan_table to public or have them set up a PLAN_TABLE in their own schema. |
Syntax: | SET AUTOTRACE { OFF | ON | TRACEONLY } [EXPLAIN] [STATISTICS] |
SET AUTOT OFF | ||
No AUTOTRACE report is generated. This is the default. | ||
SET AUTOT ON | ||
ON displays a trace report. Same as SET AUTOT ON EXP STAT The AUTOTRACE report includes data queried, the optimizer execution path and the SQL statement execution statistics. |
||
SET AUTOT ON EXPLAIN | ||
EXPLAIN shows the query execution path by performing an EXPLAIN PLAN. The AUTOTRACE report includes the data queried and only the optimizer execution path | ||
SET AUTOT ON STATISTICS | ||
Displays SQL statement statistics. The AUTOTRACE report includes the data queried and the SQL statement execution statistics. | ||
SET AUTOT ON EXPLAIN STATISTICS | ||
SET AUTOT TRACE | ||
TRACE is the same as ON but supresses the queried data. Same as entering SET AUTOT TRACE EXP STAT . The AUTOTRACE report includes data queried, the optimizer execution path and the SQL statement execution statistics. |
||
SET AUTOT TRACE EXPLAIN | ||
EXPLAIN shows the query execution path by performing an EXPLAIN PLAN. The AUTOTRACE report show the SQL statement execution statistics. | ||
SET AUTOT TRACE STATISTICS | ||
STATISTICS displays SQL statement statistics. The AUTOTRACE report show the SQL statement execution statistics. | ||
SET AUTOT TRACE EXPLAIN STATISTICS | ||
http://download-west.oracle.com/docs/cd/A97630_01/server.920/a90842/ch9.htm#1006527
Related Commands: | |
EXPLAIN PLAN | |
SHOW TIMING | Shows the value of a SQLPlus system variable(s) or current SQLPlus environment. |
CLEAR TIMING | |
SET TIMING | Reports the elapsed time to execute every query in milliseconds or 1/10 of a second. |
Related Views: | |
V$TIMER | |
V$SESSION | Lists session information for each current session. |
Related Packages: | |
DBMS_UTILITY.GET_TIME |
执行计划:
执行计划的结果:
physical reads 物理读——执行SQL的过程中,从硬盘上读取的数据块个数
redo size 重做数——执行SQL的过程中,产生的重做日志的大小
bytes set via sql*net to client 通过sql*net发送给客户端的字节数
bytes received via sql*net from client 通过sql*net接受客户端的字节数
sorts(memory) 在内存中发生的排序
sorts(disk) 不能在内存中发生的排序,需要硬盘来协助
rows processed 结果的记录数
项目 |
含义 |
备注 |
recursive calls |
递归调用SQL的个数;Oracle在执行这个SQL的时候,有时候会生成很多额外的SQL语句,这个就成为递归调用; |
|
db block gets |
逻辑读,从数据buffer cache中读取;进行current模式读取; |
|
consistent gets |
逻辑读,进行一致读模式读取; |
|
physical reads |
物理读成本; |
|
redo size |
产生重做日志大小 |
|
bytes sent via SQL*Net to client |
利用sql*net传入到client的字节数; |
|
bytes received via SQL*Net from client |
利用sql*net传出client的字节数; |
|
SQL*Net roundtrips to/from client |
|
|
sorts (memory) |
内存中排序空间使用; |
|
sorts (disk) |
物理存储中排序空间使用; |
如果memory空间使用不足,是会使用disk的空间的; |
相关推荐
在使用 Autotrace 时,需要设置相关的命令,包括 SET AUTOTRACE OFF、SET AUTOTRACE ON、SET AUTOTRACE ON EXPLAIN、SET AUTOTRACE TRACEONLY 和 SET AUTOTRACE TRACEONLY STATISTICS 等。其中,SET AUTOTRACE ON 是...
Oracle 性能分析——使用 set_autotrace_on 和 set_timing_on 来分析 select 语句的性能 Oracle 数据库性能分析是数据库优化的重要步骤之一,通过对 SQL 语句的执行计划和运行时间的分析,可以了解数据库的性能瓶颈...
Oracle的Autotrace是SQL*Plus中的一个强大工具,它主要用于帮助数据库管理员和开发人员分析SQL查询的执行计划,并收集执行时的性能统计数据。通过这些信息,可以有效地进行SQL查询优化,提高数据库的性能。下面是...
离线安装包,测试可用
矢量化,包含执行程序与C++源码。 a program for converting bitmap to vector graphics. Inputformats BMP, TGA, PNM, PPM, PGM, PBM and those supported by ImageMagick. Exportformat Postscript, svg, xfig, ...
1、文件内容:autotrace-0.31.1-38.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/autotrace-0.31.1-38.el7.tar.gz #Step2、进入解压后的目录,执行安装 ...
1、文件内容:autotrace-devel-0.31.1-38.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/autotrace-devel-0.31.1-38.el7.tar.gz #Step2、进入解压后的目录...
AutoTrace是用于将位图转换为矢量图形的实用程序。 特征 追踪轮廓和中线 减少颜色和去除斑点 支持很多输入输出格式 执照 该程序可以在GNU通用公共许可证下使用。 输入和输出功能( input-*.[ch]和output-*.[ch] )...
AutoTrace是一款开源软件,专为将位图图像转换为高质量的矢量图形设计。这款程序致力于提供与CorelTrace和Adobe Streamline相似的功能,但作为免费软件,它为用户节省了购买昂贵商业软件的成本。开源的特性使得...
autotrace 您还可以运行: autotrace 'ping google.com' 'strace -p PID' 'any other commands' ... 看到更多。 特征: 暂停运行中的程序以查看发生了什么 将PID提供给窗格的命令,它将获得主pid的子项(请参见...
rpm安装包
离线安装包,亲测可用
官方离线安装包,亲测可用
rpm安装包
离线安装包,亲测可用
离线安装包,亲测可用
离线安装包,亲测可用
离线安装包,测试可用
离线安装包,测试可用