Wednesday, February 24, 2010

Display elpased time of a query in SQL*plus/sqlplus

In SQL*plus / sqlplus if the elapsed time of the query needs to be displayed the following command can be used.


SQL> set timing on


SQL> select count(*) from employee;


COUNT(*)
----------
155667

Elapsed: 00:00:00.21
SQL>set timing off



The set timing on will display the elapsed time and the set timing off won’t display the elapsed time.

1 comment:

AskBLogger said...

Hi, for some reason the Elapsed time always shows up after I enable sqlplus to run anything. It shows on all my scheduled cron jobs. I know that I can do "set timing off" to disable it but once I log off from the session and log back on the timing on was enabled.

How do I disable "Timing off" completely?

Please advise

Thank you

Powered By Blogger