記錄Oracle語(yǔ)句執(zhí)行時(shí)間的簡(jiǎn)單方法
作者:佚名
Oracle語(yǔ)句的執(zhí)行時(shí)間應(yīng)該如何取得呢?這是很多人都提到的問(wèn)題,下文就教您一個(gè)簡(jiǎn)單的記錄Oracle語(yǔ)句執(zhí)行時(shí)間的方法,供您參考。
Oracle語(yǔ)句執(zhí)行時(shí)間記錄的方法我們經(jīng)常會(huì)用到,下面就教您一個(gè)記錄Oracle語(yǔ)句執(zhí)行時(shí)間的簡(jiǎn)單方法,希望對(duì)你能有所幫助。
在實(shí)際的工作和學(xué)習(xí)中,許多人經(jīng)常需要獲取或記錄Oracle語(yǔ)句的執(zhí)行時(shí)間,其實(shí)簡(jiǎn)單的方法就能實(shí)現(xiàn),具體代碼如下:
OracleE語(yǔ)句執(zhí)行時(shí)間需要使用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
- 已用時(shí)間: 00: 00: 00.12
【編輯推薦】
責(zé)任編輯:段燃
來(lái)源:
互聯(lián)網(wǎng)