Get and store execution time in Oracle

1.6k Views Asked by At

Is there a way to get and store the execution time of a select?

select * from table1

Thank you, Radu.

3

There are 3 best solutions below

0
On

Oracle provides TIMING command to check the execution time taken for a query.

http://infolab.stanford.edu/~ullman/fcdb/oracle/or-nonstandard.html#timing%20sql%20commands

0
On

All SQL statements are stored in V$SQL, but they will age out eventually. ELAPSED_TIME/EXECUTIONS will get you the average time to run the query.

0
On

Tom Kyte has developed a pretty simple test harness called runstats that gives you great timing information.