Home > Database > Mysql Tutorial > body text

获取或记录 Oracle 语句的执行时间

WBOY
Release: 2016-06-07 15:03:44
Original
1230 people have browsed it

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 很多情况下我们需要获取或记录Oracle语句执行时间,其实简单的方法就能实现,具体代码如下: OracleE语句的执行时间需要使用 SET TIMING ON,例如: [oracle@jw ~]$ sqlplus "/as sysdba"SQL*Plus:

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

  很多情况下我们需要获取或记录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.
Copy after login

  连接到:

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>
Copy after login

获取或记录 Oracle 语句的执行时间

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!