Identifying Resource-Intensive SQL
Posted at Wednesday, June 18, 2008
Here is a short example on how to identify resource-intensive SQL by querying the DBA_HIST_* views.
In my example, I query the AWR, ranking the top 20 SQL statements using a rough formula based upon CPU and IO-related statistics for the time period in question. In my case, I am querying the current day, but this can be changed to examine time periods further in the past as well.
Top 20 Resource-intensive SQL Example
Top 20 Resource-intensive SQL Example Source (Right-Click - Save Target As...)
In my example, I query the AWR, ranking the top 20 SQL statements using a rough formula based upon CPU and IO-related statistics for the time period in question. In my case, I am querying the current day, but this can be changed to examine time periods further in the past as well.
Top 20 Resource-intensive SQL Example
Top 20 Resource-intensive SQL Example Source (Right-Click - Save Target As...)
Labels: Tuning
