01.09.2016 Views

Beginning Oracle Database 11g Administration From Novice to Professional

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 10 MONITORING 213<br />

Moni<strong>to</strong>ring Performance<br />

Be sure <strong>to</strong> moni<strong>to</strong>r the performance of important queries. The view records<br />

execution statistics such as executions, CPU time, elapsed time, logical reads, and physical<br />

reads for each SQL statement cached in the library cache—it is therefore a source of<br />

workload information as well as performance information. Snapshots of the information in<br />

the view are available in the table (in the case of STATSPACK)<br />

and in the view (in the case of AWR). The SQL statement in Listing 10-10<br />

retrieves the average execution times of each of two SQL queries of choice in successive<br />

time periods; the query can easily be modified <strong>to</strong> include additional queries that are critical<br />

<strong>to</strong> application performance. Notice the use of the analytic function <strong>to</strong> interpolate<br />

missing values.<br />

Listing 10-10. SQL Query <strong>to</strong> List the Average Elapsed Times for Two SQL Queries of Choice

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!