Oracle query execution time

Viewed 140637

I would like to get the query execution time in Oracle. I don't want the time Oracle needs to print the results - just the execution time.

In MySQL it is easy to get the execution time from the shell.

How can I do this in SQL*Plus?

5 Answers
set timing on
spool /home/sss/somefile.txt
set termout off
select ...
set termout on
set timing off
spool off

Save it to a script.sql, and do this in terminal:

sqlcl user@host/dbname @/path/to/your/script.sql
Related