记录Oracle语句执行时间的简单方法

Oracle语句的执行时间应该如何取得呢?这是很多人都提到的问题,下文就教您一个简单的记录Oracle语句执行时间的方法,供您参考。
首页 新闻资讯 行业资讯 记录Oracle语句执行时间的简单方法

Oracle语句执行时间记录的方法我们经常会用到,下面就教您一个记录Oracle语句执行时间的简单方法,希望对你能有所帮助。

在实际的工作和学习中,许多人经常需要获取或记录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
  • 1.

  • 2.

  • 3.

  • 4.

  • 5.

  • 6.

  • 7.

  • 8.

  • 9.

  • 10.

  • 11.

  • 12.

  • 13.

  • 14.

  • 15.

  • 16.

  • 17.

  • 18.

  • 19.

  • 20.

  • 21.

  • 22.

  • 23.

  • 24.

  • 25.

  • 26.

  • 27.

  • 28.

  • 29.

  • 30.

  • 31.

  • 32.

  • 33.

 

 

 

 

【编辑推荐】

Oracle修改用户语法介绍

详解oracle授权语句

Oracle身份验证的三种方法

Oracle默认用户的密码问题

带您了解Oracle显式游标

18    2010-11-18 15:53:30    Oracle语句执行时间