Radu Dragomir
Radu Dragomir

Reputation: 660

Get and store execution time in Oracle

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

select * from table1

Thank you, Radu.

Upvotes: 2

Views: 1735

Answers (3)

Jon Heller
Jon Heller

Reputation: 36922

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.

Upvotes: 0

DCookie
DCookie

Reputation: 43553

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

Upvotes: 0

Sachin Shanbhag
Sachin Shanbhag

Reputation: 55529

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

Upvotes: 1

Related Questions