·天新网首页·加入收藏·设为首页
首页|笔记本|手机|数码相机|摄像机|MP3/MP4|主板|内存|显示器|办公|打印机|下载|开发|汽车|学院|业界
硬件|台式机|数码|数字家庭|投影仪|GPS/CPU|显卡|硬盘|服务器|网络|一体机|驱动|源码|游戏|考试|报价
您现在的位置:天新网 > 软件开发 > 数据库开发 > Oracle
用简单的方法获取Oracle语句的执行时间
http://dev.21tx.com 2008年05月16日 赛迪网 Hugh

  很多情况下我们需要获取或记录Oracle语句执行时间,其实简单的方法就能实现,具体代码如下:

  OracleE语句的执行时间需要使用 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>

  

  

上一篇: 详细讲解Oracle物理结构故障的处理方法
下一篇: 删除Oracle数据库10g垃圾表的最新方法

Google
 
热点文章
关于我们 | 联系我们 | 广告服务 | 工作机会 | 版权声明 | 欢迎投稿 | 网站地图
Copyright © 2000-2008 , www.21tx.com , All Rights Reserved .
© 晨新科技 版权所有 Created by TXSite.net