SQL ordered by Elapsed Time in AWR report

Nidheesh picture Nidheesh · Jun 10, 2014 · Viewed 13.7k times · Source

I was trying to analyze the AWR report generated for a particular process with a duration of one hour. I am trying to find out which query is taking much time to while running the process.

When I have gone through the report, I can see SQL ordered by Gets,SQL ordered by CPU Time,SQL ordered by Executions,SQL ordered by Parse Calls, SQL ordered by Sharable Memory,SQL ordered by Elapsed Time etc.

I can see the SQL Text from the table SQL ordered by Elapsed Time.

My question: Is this the right way to identify the expensive query ? Please advise in this regard.

Elapsed Time (s)    SQL Text
19,477.05            select abc.....
7,644.04             select def...

Answer

Nidheesh picture Nidheesh · Jun 11, 2014

SQL Ordered by Elapsed Time , includes SQL statements that took significant execution time during processing.We have to look at Executions,Elapsed time per Exec (s) etc. along with Elapsed time to analyze.

For example,a query has low Executions and high Elapsed time per Exec (s) and this query could be a candidate for troubleshooting or optimizations.

The best reference I found so far: http://www.dbas-oracle.com/2013/05/10-steps-to-analyze-awr-report-in-oracle.html