标题: 用最简单的方法记录Oracle语句的执行
lonjew
元帅
Rank: 1



UID 73191
精华 1
积分 30615
帖子 14941
威望 3
金币 14931
热心 12
阅读权限 100
注册 2008-1-28
状态 离线
用最简单的方法记录Oracle语句的执行

用最简单的方法记录Oracle语句的执行
        在实际的工作和学习中,许多人经常需要获取或记录
Oracle
语句的执行时间,其实简单的方法就能实现,具体代码如下:

Oracle
E语句的执行时间需要使用 SET TIMING ON,例如:





[oracle@jw "]$ sqlplus "/as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on
星期二 8月 28 16:59:43 2007
Copyright (c) 1982, 2002, Oracle
Corporation. All rights reserved.
连接到:





Oracle9i Enterprise Edition
Release 9.2.0.4.0 - Production
With the Partitioning, Oracle Label Security,
OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL> set timing on;
SQL> select count(*) from tab;

COUNT(*)
----------
2447

已用时间: 00: 00: 00.12
SQL>

网友 lonjew 签名 - 网友社区 ==
顶部
[广告] 免费域名(Free Subdomain) 免费空间(Free hosting) PR查询(Google Pagerank)



当前时区 GMT+8, 现在时间是 2008-10-8 17:09
信产部ICP备案:京ICP备05066424号 北京市公安局网监备案:1101050648号

Powered by Discuz! 5.5.0
清除 Cookies - 联系我们 - 网友俱乐部 - Archiver - WAP