Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calculation of the wall time of an SQL Query

User_3ZQRHJan 6 2016 — edited Jan 11 2016

Hi,

While trying to find out the execution time (wall time) of a SQL query I read in one place that CPU_TIME/EXECUTIONS from v$SQLAREA, is the accurate run time that we can come close to.

I cannot use "set timing on" or "DBMS_UTILITY.GET_TIME" as I need to extract the execution time from history because the query will be fired in front end, and I need to find out how time it took at DB level and compare it with the total time in the front end to calculate the % of time utilised in the DB level.

May be another way is to trace the sessions and theh user TKPORPOF but as of now I donot want to take help from the DBA at such initial stage.

Is CPU_TIME/EXECUTIONS from v$SQLAREA where UPPER (SQL_TEXT) LIKE 'SELECT ... FROM ... %'; should suffice ?

This post has been answered by Mark D Powell on Jan 9 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2016
Added on Jan 6 2016
14 comments
3,249 views