But there is lots more information in
that is useful.The query below will extract importing costing information for allobjects involved in each query.col c1 heading 'Begin|Interval|time' format a20col c2 heading 'SQL|ID' format a13col c3 heading 'Object|Name' format a20col c4 heading 'Search Columns' format 9,999col c5 heading 'Cardinality' format 9,999col c6 heading 'Disk|Reads|Delta' format 9,999col c7 heading 'Rows|Processed' format 9,999break on c1 skip 2break on c2 skip 2select begin_interval_time c1, sql_id c2, object_name c3, bytes c4,cpu_cost c5, io_cost c6, temp_space c7 from dba_hist_sql_planorder by c1, c2;Now that we see the important table structures lets examine how we canget spectacular reports from this AWR data.
Viewing table and index access with AWR
One of the problems in Oracle9i was the single bit-flag that was usedto monitor index usage. You could set the flag with the "
alter index xxx monitoring usage
" command, and see if the index was accessed byquerying the
view.The goal of any index access is to use the most selective index for aquery, the one that produces the smallest number of rows. The Oracledata dictionary is usually quite good at this, but it is up to you todefine the index. Missing function-based indexes are a common source ofsub-optimal SQL execution because Oracle will not use an indexed columnunless the WHERE clause matches the index column exactly.col c1 heading 'Begin|Interval|time' format a20col c2 heading 'SQL|ID' format a13col c3 heading 'Object|Name' format a20col c4 heading 'Search Columns' format 999,999col c5 heading 'Cardinality' format 999,999col c6 heading 'Disk|Reads|Delta' format 999,999col c7 heading 'Rows|Processed' format 999,999